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

TimeoutError not defined in Python 2.7 #21

Closed
Vince-vd opened this issue May 6, 2020 · 2 comments
Closed

TimeoutError not defined in Python 2.7 #21

Vince-vd opened this issue May 6, 2020 · 2 comments

Comments

@Vince-vd
Copy link

Vince-vd commented May 6, 2020

global name 'TimeoutError' is not defined
When the TimeoutError is raised in Python 2.7 it results in a NameError. From what I can tell TimeoutError wasn't introduced until Python 3.3

Recommendation
Please define a custom "TimeoutError" class in the beginning of the library for systems using Python 2. It would be very helpful to be able to handle this error in my code where I import the library when this happens. Right now I have to handle it as a "NameError" instead.

@abelectronicsuk
Copy link
Owner

Thank you for your message. I have added a custom TimeoutError class to the ADC Pi and ADC Differential Pi libraries.

@Vince-vd
Copy link
Author

Works like a charm.
Thanks for the quick response and modification!

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

No branches or pull requests

2 participants