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
Fixed normal retry time.sleep to use interval #8
Conversation
@@ -157,19 +159,25 @@ def _handle_error(self, err): | |||
# Update latest cached error | |||
self.error = err | |||
|
|||
# Did user interrupt function? | |||
if err is KeyboardInterrupt or err is ImportError: | |||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, but I'm going to support this in a more versatile way where the developer can add/mutate the error exceptions whitelist.
LGTM, however I'm going to introduce some changes there in order to support some features. |
self.on_retry(err, delay) | ||
|
||
# Sleep before next try | ||
self.sleep(0.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I don't know how I forgot about this.
Also fixed inconsistent test: #7
Also added ImportError and KeyboardInterrupt to be raised despite retry: #6