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

add catch for network timeouts #671

Merged
merged 3 commits into from
Jul 17, 2017

Conversation

peendebak
Copy link
Contributor

Sometimes the slack bot generates an error due to a network timeout. This PR prevents this from happening by catching a timeout error.

@giulioungaretti @nulinspiratie

@nulinspiratie
Copy link
Contributor

Nice! I ran into the same problem a few times. I think the specific error that is raised is
from requests.exceptions import ReadTimeout
It might be worthwhile to catch that particular error. Also, perhaps sending the exception to a logger is more useful.

@peendebak
Copy link
Contributor Author

@nulinspiratie Thanks for the idea, I changed the code.

@jenshnielsen @WilliamHPNielsen

Copy link
Collaborator

@jenshnielsen jenshnielsen left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jenshnielsen jenshnielsen merged commit bba3106 into microsoft:master Jul 17, 2017
giulioungaretti pushed a commit that referenced this pull request Jul 17, 2017
Author: peendebak <P.T.eendebak@tudelft.nl>

    add catch for network timeouts (#671)
giulioungaretti pushed a commit that referenced this pull request Jul 17, 2017
Author: peendebak <P.T.eendebak@tudelft.nl>

    add catch for network timeouts (#671)
Dominik-Vogel pushed a commit to Dominik-Vogel/Qcodes that referenced this pull request Aug 9, 2017
* add catch for network timeouts

* fix codacity error

* catch proper exception
@peendebak peendebak deleted the fix/slack branch October 19, 2017 13:22
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.

None yet

3 participants