From 31baaa4a8ec5545be073bc6fc8ff3dd7a49d9707 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 1 Jan 2017 17:08:57 -0500 Subject: [PATCH] Rearrange a comment. --- bin/untangle-https-backup | 7 ++++--- src/untangle/untangle.py | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) 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) diff --git a/src/untangle/untangle.py b/src/untangle/untangle.py index 05df722..31ab60e 100644 --- a/src/untangle/untangle.py +++ b/src/untangle/untangle.py @@ -38,7 +38,6 @@ class Untangle: msg += 'in section "' + s.name + '"' raise configparser.ParsingError(msg) - # # Finally, create a URL opener to make HTTPS requests. # # First, create a cookie jar that we'll attach to our URL -- 2.43.2