'Received response from device(s)'

def _handle_set_response(self, iq):

    seqnr = iq['id']
    from_jid = str(iq['from'])
    result = iq['setResponse']['responseCode']
    nodeIds = [n['name'] for n in iq['setResponse']['nodes']]
    fields = [f['name'] for f in iq['setResponse']['datas']]
    error_msg = None
    if ((not (iq['setResponse'].find('error') is None)) and (not (iq['setResponse']['error']['text'] == ''))):
        error_msg = iq['setResponse']['error']['text']
    callback = self.sessions[seqnr]['callback']
    callback(from_jid=from_jid, result=result, nodeIds=nodeIds, fields=fields, error_msg=error_msg)
