Skip to content
This repository has been archived by the owner on Feb 10, 2018. It is now read-only.

don't leak eznc connect exceptions #53

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions napalm_junos/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down