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

Display ipc path in case of ENOENT exception #1301

Merged
merged 2 commits into from
Jun 27, 2019
Merged

Conversation

Peque
Copy link
Contributor

@Peque Peque commented Jun 26, 2019

Useful to see right in the traceback which ipc path caused the
exception.

@Peque Peque force-pushed the nosuchfile branch 2 times, most recently from 1ae10b3 to f279299 Compare June 26, 2019 14:40
Useful to see right in the traceback which ipc path caused the
exception.
Copy link
Member

@minrk minrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I proposed one more assert, just to be sure it's not dropping the errno.

s.bind('ipc://{0}'.format(invalid_path))
error_message = str(error.value)
assert invalid_path in error_message
assert "no such file or directory" in error_message.lower()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add one more assert that error.errno == ENOENT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

I pushed a fixup with that change.

Tell me if it is good for you and I will squash it. Or feel free to squash it yourself before merging. 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for that. Thanks!

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.

2 participants