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

Provide timeout for flickr REST calls #27

Closed
sybrenstuvel opened this issue Jun 5, 2013 · 2 comments
Closed

Provide timeout for flickr REST calls #27

sybrenstuvel opened this issue Jun 5, 2013 · 2 comments

Comments

@sybrenstuvel
Copy link
Owner

Originally reported by: Domen Kožar (Bitbucket: iElectric, GitHub: Unknown)


In case the website is down, it would be wise to set timeout to 3 seconds or similar


@sybrenstuvel
Copy link
Owner Author

Original comment by Sybren Stüvel (Bitbucket: sybren, GitHub: sybren):


This is a good idea.

In the mean time, you can use http://docs.python.org/3/library/socket.html#socket.setdefaulttimeout to simply set a default timeout before performing your FlickrAPI call.

@sybrenstuvel
Copy link
Owner Author

Original comment by Domen Kožar (Bitbucket: iElectric, GitHub: Unknown):


socket.setdefaulttimeout changes global state, which can lead to unexpected problems, but for now it will do :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant