Revision 454339d6
b/ncclient/manager.py | ||
---|---|---|
18 | 18 |
import operations |
19 | 19 |
import transport |
20 | 20 |
|
21 |
import logging |
|
22 |
logger = logging.getLogger('ncclient.manager') |
|
23 |
|
|
21 | 24 |
def connect_ssh(*args, **kwds): |
22 | 25 |
"""Connect to NETCONF server over SSH. See :meth:`SSHSession.connect() |
23 | 26 |
<ncclient.transport.SSHSession.connect>` for function signature.""" |
... | ... | |
55 | 58 |
""" |
56 | 59 |
self._raise = action |
57 | 60 |
|
58 |
#def __enter__(self):
|
|
59 |
# return self
|
|
60 |
# |
|
61 |
#def __exit__(self, *args):
|
|
62 |
# self.close()
|
|
63 |
# return False
|
|
61 |
def __enter__(self): |
|
62 |
return self |
|
63 |
|
|
64 |
def __exit__(self, *args): |
|
65 |
self.close() |
|
66 |
return False |
|
64 | 67 |
|
65 | 68 |
def do(self, op, *args, **kwds): |
66 | 69 |
op = operations.OPERATIONS[op](self._session) |
Also available in: Unified diff