Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Removed unreachable exceptions.#1260

Merged
dirk-thomas merged 2 commits intoros:lunar-develfrom
ajeetdsouza:lunar-devel
Jan 31, 2018
Merged

Removed unreachable exceptions.#1260
dirk-thomas merged 2 commits intoros:lunar-develfrom
ajeetdsouza:lunar-devel

Conversation

@ajeetdsouza
Copy link
Copy Markdown
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
Copy Markdown
Contributor

mgrrx commented Dec 30, 2017

LGTM

Copy link
Copy Markdown
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.

except socket.error as e:
# #1824
if e[0] == 111:
if e.args[0] == 111:
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants