+ tpl = '{:s}: HTTP error {:s} from {:s}'
+ msg = tpl.format(u.name, str(e.code), u.host)
+ print(msg, file=stderr)
+ status = EXIT_BACKUPS_FAILED
+ except HTTPException as e:
+ # At least one sort of HTTPException (BadStatusLine) is not
+ # translated by urllib into an HTTPError, so we catch
+ # HTTPExceptions too.
+ tpl = '{:s}: HTTP exception {:s} from {:s}'
+ 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)