from http.client import HTTPException
from os import chmod
from urllib.error import HTTPError, URLError
+from socket import timeout
from sys import stderr
from untangle.untangle import Untangle
msg = tpl.format(u.name, repr(e), u.host)
print(msg, file=stderr)
status = EXIT_BACKUPS_FAILED
+ except timeout as e:
+ # A socket.timeout exception occurs when something goes over
+ # the configured "timeout" limit.
+ tpl = '{:s}: socket timeout ({:s}) from {:s}'
+ msg = tpl.format(u.name, str(e), u.host)
+ print(msg, file=stderr)
+ status = EXIT_BACKUPS_FAILED
exit(status)