Revision cb96607b

b/ncclient/operations/rpc.py
58 58
            return
59 59
        root = self._root = content.xml2ele(self._raw) # <rpc-reply> element
60 60
        # per rfc 4741 an <ok/> tag is sent when there are no errors or warnings
61
        ok = content.find(root, 'data', nslist=[content.BASE_NS, content.CISCO_BS])
61
        ok = content.find(root, 'ok', nslist=[content.BASE_NS, content.CISCO_BS])
62 62
        if ok is not None:
63 63
            logger.debug('parsed [%s]' % ok.tag)
64 64
        else: # create RPCError objects from <rpc-error> elements
65
            error = content.find(root, 'data', nslist=[content.BASE_NS, content.CISCO_BS])
65
            error = content.find(root, 'rpc-error', nslist=[content.BASE_NS, content.CISCO_BS])
66 66
            if error is not None:
67 67
                logger.debug('parsed [%s]' % error.tag)
68 68
                for err in root.getiterator(error.tag):

Also available in: Unified diff