Revision 8a5bc5f1 ncclient/listeners.py
b/ncclient/listeners.py | ||
---|---|---|
22 | 22 |
|
23 | 23 |
################################################################################ |
24 | 24 |
|
25 |
# {session-id: SessionListener} |
|
25 | 26 |
session_listeners = WeakValueDictionary |
26 | 27 |
def session_listener_factory(session): |
27 | 28 |
try: |
... | ... | |
33 | 34 |
class SessionListener: |
34 | 35 |
|
35 | 36 |
def __init__(self): |
36 |
self._id2rpc = WeakValueDictionary() |
|
37 |
# {message-id: RPC} |
|
38 |
self._rpc = WeakValueDictionary() |
|
39 |
# if the session gets closed by remote endpoint, |
|
40 |
# need to know if it is an error event or was requested through |
|
41 |
# a NETCONF operation i.e. CloseSession |
|
37 | 42 |
self._expecting_close = False |
38 |
sself._notification_rpc_id = None |
|
43 |
# other recognized names |
|
44 |
self._recognized = [] |
|
39 | 45 |
|
40 | 46 |
def __str__(self): |
41 | 47 |
return 'SessionListener' |
Also available in: Unified diff