Removed unreachable exceptions.#1260
Removed unreachable exceptions.#1260dirk-thomas merged 2 commits intoros:lunar-develfrom ajeetdsouza:lunar-devel
Conversation
|
LGTM |
dirk-thomas
left a comment
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
How is this change related to the issue title?
There was a problem hiding this comment.
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.
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.
ROSInterruptExceptionis a subclass ofKeyboardInterruptand both exceptions are being handled the same way (pass). I removed theROSInterruptExceptionhandling since it was placed after theKeyboardInterruptand was thus unreachable.