1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #17481 from privateip/junos

minor update to catch expection if trying close a non existent session
This commit is contained in:
Peter Sprygada 2016-09-09 10:42:05 -04:00 committed by GitHub
commit 19e00cf160

View file

@ -105,8 +105,10 @@ class Netconf(object):
self._connected = True
def disconnect(self):
if self.device:
try:
self.device.close()
except AttributeError:
pass
self._connected = False
### Command methods ###