ask-compu / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Use a timeout connexion in case Twitter is down #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Twitter doesn't respond

What is the expected output? What do you see instead?
* Use a timeout that the user can choose (in secs?) in order that if
Twitter doesn't respond, the script raise an Exception after the timeout
exceed.

What version of the product are you using? On what operating system?
* The recent (Trunk)

Original issue reported on code.google.com by cx42...@gmail.com on 3 Sep 2009 at 11:35

GoogleCodeExporter commented 9 years ago
As a workaround you can use

import socket
socket.setdefaulttimeout(60)

in your script. Helped for me.

Original comment by maextr...@gmail.com on 4 Sep 2009 at 5:25

GoogleCodeExporter commented 9 years ago
Great, I'll do that :)
Thanks !

Original comment by cx42...@gmail.com on 4 Sep 2009 at 9:03