-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle ncclient timeout exception at close. #787
Conversation
If dev.close() is called while another RPC is still in progress, such as might happen if the dev.timeout=1, then it's possible the dev.close() will encounter a ncclient.operations.errors.TimeoutExpiredError exception. Hanlde this exception and convert it to a RpcTimeoutError.
Build finished. 730 tests run, 0 skipped, 0 failed. |
Can one of the admins verify this patch? |
Build triggered. sha1 is merged. |
Build started sha1 is merged. |
Build finished. |
ok to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. thanks @stacywsmith
What's the progress about this? We need this fix ... |
@kokel @stacywsmith wondering in case of RpcTimeoutError should we be setting dev.connected to False? |
No. You can't set You could potentially catch the timeout exception inside the |
If
dev.close()
is called while another RPC is still in progress,such as might happen if
dev.timeout=1
, then it's possiblethe
dev.close()
will encounter ancclient.operations.errors.TimeoutExpiredError
exception.Hanlde this exception and convert it to a
RpcTimeoutError
.