diff --git a/napalm_junos/junos.py b/napalm_junos/junos.py index 8b1b40f..5348eb2 100644 --- a/napalm_junos/junos.py +++ b/napalm_junos/junos.py @@ -27,6 +27,7 @@ from jnpr.junos.utils.config import Config from jnpr.junos.exception import ConfigLoadError from jnpr.junos.exception import RpcTimeoutError +from jnpr.junos.exception import ConnectError from jnpr.junos.exception import ConnectTimeoutError # import NAPALM Base @@ -74,6 +75,8 @@ def open(self): self.device.open() except ConnectTimeoutError as cte: raise ConnectionException(cte.message) + except ConnectError as cte: + raise ConnectionException(cte.message) self.device.timeout = self.timeout if hasattr(self.device, "cu"): # make sure to remove the cu attr from previous session