Revision 7c4ff459 ncclient/operations/rpc.py

b/ncclient/operations/rpc.py
116 116
    }
117 117
    
118 118
    def __init__(self, err):
119
        for attr in tag_to_attr.values():
119
        for attr in RPCError.tag_to_attr.values():
120 120
            setattr(self, attr, None)
121 121
        for subele in err:
122
            attr = tag_to_attr.get(subele.tag, None)
122
            attr = RPCError.tag_to_attr.get(subele.tag, None)
123 123
            if attr is not None:
124 124
                setattr(self, attr, subele.text)
125 125
        if self.message is not None:
......
128 128
            OperationError.__init__(self, self.to_dict())
129 129
    
130 130
    def to_dict(self):
131
        return dict([ (attr[1:], gettattr(self, attr)) for attr in tag_to_attr.values() ])
131
        return dict([ (attr[1:], gettattr(self, attr)) for attr in RPCError.tag_to_attr.values() ])
132 132
    
133 133
    @property
134 134
    def type(self):
......
167 167
    
168 168
    # one instance per session -- maybe there is a better way??
169 169
    def __new__(cls, session):
170
        with creation_lock:
170
        with RPCReplyListener.creation_lock:
171 171
            instance = session.get_listener_instance(cls)
172 172
            if instance is None:
173 173
                instance = object.__new__(cls)

Also available in: Unified diff