-
Notifications
You must be signed in to change notification settings - Fork 914
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
Removed unreachable exceptions. #1260
Conversation
LGTM |
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.
Can you please clarify why these exceptions are unreachable.
Please also spend a minimum amount of time when filling and issue / pull request to provide the necessary context.
@@ -203,7 +203,7 @@ def _ssh_exec(self, command, address, port, username=None, password=None): | |||
err_msg = "Unable to establish ssh connection to [%s%s:%s]: %s"%(username_str, address, port, e) | |||
except socket.error as e: | |||
# #1824 | |||
if e[0] == 111: | |||
if e.args[0] == 111: |
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.
How is this change related to the issue title?
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.
I updated the description. Also, changing e[0]
to e.args[0]
wasn't really related - I will create separate PRs the next time. Given that I have deleted my fork, is there any way to fix this on my end? Alternatively, you could cherry pick the first commit and ignore the second.
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.
Thank you for the additional information.
With the forked repo being delete I am not sure I can cherry-pick individual commits. I will just squash both commits during the merge in this case.
ROSInterruptException
is a subclass ofKeyboardInterrupt
and both exceptions are being handled the same way (pass
). I removed theROSInterruptException
handling since it was placed after theKeyboardInterrupt
and was thus unreachable.