Skip to content
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

Merged
merged 2 commits into from
Jan 31, 2018
Merged

Removed unreachable exceptions. #1260

merged 2 commits into from
Jan 31, 2018

Conversation

ajeetdsouza
Copy link
Contributor

@ajeetdsouza ajeetdsouza commented Dec 13, 2017

ROSInterruptException is a subclass of KeyboardInterrupt and both exceptions are being handled the same way (pass). I removed the ROSInterruptException handling since it was placed after the KeyboardInterrupt and was thus unreachable.

@mgrrx
Copy link
Contributor

mgrrx commented Dec 30, 2017

LGTM

Copy link
Member

@dirk-thomas dirk-thomas left a 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:
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants