def getPrivacyList(disp, listname):
 try:
  resp = disp.SendAndWaitForResponse(Iq('get', NS_PRIVACY, payload=[Node('list', {'name': listname})]))
  if isResultNode(resp):
   return resp.getQueryPayload()[0]
 except:
  pass

def getPrivacyList ( disp , listname ) : try : resp = disp . SendAndWaitForResponse ( Iq ( 'get' , NS_PRIVACY , payload = [ Node ( 'list' , { 'name' : listname } ) ] ) ) if isResultNode ( resp ) : return resp . getQueryPayload ( ) [ 0 ] except : pass
requests specific privacy list listname .