Skip to content

Commit 1fd7a1e

Browse files
committed
Mark XML agent dead on TimeoutException
1 parent 4b8eab5 commit 1fd7a1e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pyIOSXR/exceptions.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,15 @@ class InvalidXMLResponse(IOSXRException):
8989

9090
pass
9191

92+
9293
class TimeoutError(IOSXRException):
9394
"""TimeoutError Exception."""
9495

95-
pass
96+
def __init__(self, msg=None, dev=None):
97+
super(TimeoutError, self).__init__(msg=msg, dev=dev)
98+
if dev:
99+
self._xr = dev
100+
self._xr._xml_agent_alive = False
96101

97102

98103
class EOFError(IOSXRException):

0 commit comments

Comments
 (0)