Commit 4ea772dc authored by Ralf's avatar Ralf
Browse files

catch more socket errors

parent 121c0923
from threading import Lock
from libtuer import ThreadFunction, logger
import urllib.request, time
import urllib.request, time, socket
from config import spaceApiKey
......@@ -32,7 +32,7 @@ class SpaceApi:
return True
logger.error("SpaceAPI: returned unexpected code {}:\n{}".format(response.getcode(), responseText))
return False
except (urllib.request.URLError, OSError) as e:
except (urllib.request.URLError, OSError, socket.timeout) as e:
logger.error("SpaceAPI: update returned error: {}".format(str(e)))
return False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment