def getPrivacyLists(disp):
 try:
  dict = {'lists': []}
  resp = disp.SendAndWaitForResponse(Iq('get', NS_PRIVACY))
  if (not isResultNode(resp)):
   return
  for list in resp.getQueryPayload():
   if (list.getName() == 'list'):
    dict['lists'].append(list.getAttr('name'))
   else:
    dict[list.getName()] = list.getAttr('name')
  return dict
 except:
  pass

def getPrivacyLists ( disp ) : try : dict = { 'lists' : [ ] } resp = disp . SendAndWaitForResponse ( Iq ( 'get' , NS_PRIVACY ) ) if ( not isResultNode ( resp ) ) : return for list in resp . getQueryPayload ( ) : if ( list . getName ( ) == 'list' ) : dict [ 'lists' ] . append ( list . getAttr ( 'name' ) ) else : dict [ list . getName ( ) ] = list . getAttr ( 'name' ) return dict except : pass
requests privacy lists from connected server .