Revision 22566666 ncclient/operations/rpc.py

b/ncclient/operations/rpc.py
114 114
        self._path = None
115 115
        self._message = None
116 116
        for subele in err:
117
            if subele.tag == qualify("error-tag"):
117
            if subele.tag == qualify("error-type"):
118
                self._type = subele.text
119
            elif subele.tag == qualify("error-tag"):
118 120
                self._tag = subele.text
119 121
            elif subele.tag == qualify("error-severity"):
120 122
                self._severity = subele.text
......
127 129
        if self.message is not None:
128 130
            OperationError.__init__(self, self.message)
129 131
        else:
130
            OperationError.__init__(self)
131

  
132
            OperationError.__init__(self, to_dict())
133
    
134
    def to_dict(self):
135
        return {
136
            'type': self.type,
137
            'tag': self.severity,
138
            'path': self.path,
139
            'message': self.message,
140
            'info': self.info
141
        }
142
    
132 143
    @property
133 144
    def type(self):
134 145
        "`string` representing text of *error-type* element"

Also available in: Unified diff