Merge pull request #17481 from privateip/junos

minor update to catch expection if trying close a non existent session
pull/13491/merge
Peter Sprygada 8 years ago committed by GitHub
commit 19e00cf160

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

Loading…
Cancel
Save