X-Git-Url: http://gitweb.michael.orlitzky.com/?p=untangle-https-backup.git;a=blobdiff_plain;f=bin%2Funtangle-https-backup;fp=bin%2Funtangle-https-backup;h=1f6a2db3fcf671c27176aeff71d01f0fd52912cd;hp=69e46ba0c6af76de91f61a8db725c7df4b25fd26;hb=31baaa4a8ec5545be073bc6fc8ff3dd7a49d9707;hpb=e902576de37fc1d86edb35d852b3149fde55213e diff --git a/bin/untangle-https-backup b/bin/untangle-https-backup index 69e46ba..1f6a2db 100755 --- a/bin/untangle-https-backup +++ b/bin/untangle-https-backup @@ -52,9 +52,7 @@ for section in config.sections(): chmod(filename, 0o600) # If it didn't work, but in a predictable way (some host is down), - # then we report that error and keep going. At least one sort of - # HTTPException (BadStatusLine) is not translated by urllib into - # an HTTPError, so we catch HTTPExceptions too. + # then we report that error and keep going. except URLError as e: tpl = '{:s}: {:s} from {:s}' msg = tpl.format(u.name, str(e.reason), u.host) @@ -66,6 +64,9 @@ for section in config.sections(): 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)