NebulousLabs / python-skynet

Library for integrating Skynet with Python applications
MIT License
19 stars 11 forks source link

Ability to set request timeout #18

Closed DaWe35 closed 4 years ago

DaWe35 commented 4 years ago

For SkyLive it would be very useful. Sometimes a portal does not answer and I need to switch to another before it's too late.

Example code:

try: 
    url = "http://google.com"
    r = requests.get(url, timeout=10)
except requests.exceptions.Timeout as e: 
    print e