Revision 7c4ff459

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)
b/ncclient/operations/session.py
24 24

  
25 25
    def request(self):
26 26
        try:
27
            return self._request(new_ele("close-sesion"))
27
            return self._request(new_ele("close-session"))
28 28
        finally:
29 29
            self.session.close()
30 30

  

Also available in: Unified diff