From 3915c9a26fe0c9b49f2eb55d74d9be424ad24504 Mon Sep 17 00:00:00 2001 From: Walter Lapchynski Date: Mon, 15 Oct 2018 21:20:25 -0700 Subject: [PATCH] Add missing identifiers for urllib exception handling. --- common/modules/automirror/main.py | 8 ++++---- debian/changelog | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/modules/automirror/main.py b/common/modules/automirror/main.py index 927a2b9..4762e44 100644 --- a/common/modules/automirror/main.py +++ b/common/modules/automirror/main.py @@ -90,10 +90,10 @@ def getcountry(): try: with urllib.request.urlopen(geoipurl, timeout=75) as url: localedata = json.loads(url.read().decode()) - except HTTPError: + except HTTPError as error: logging.error("Data of %s not retrieved because %s - URL: %s", name, error, url) - except URLError: + except URLError as error: if isinstance(error.reason, socket.timeout): logging.error("Socket timed out - URL %s", url) else: @@ -108,10 +108,10 @@ def getmirror(country): try: with urllib.request.urlopen(mirrorlisturl, timeout=75) as url: mirrors = json.loads(url.read().decode()) - except HTTPError: + except HTTPError as error: logging.error("Data of %s not retrieved because %s - URL: %s", name, error, url) - except URLError: + except URLError as error: if isinstance(error.reason, socket.timeout): logging.error("Socket timed out - URL %s", url) else: diff --git a/debian/changelog b/debian/changelog index 1934da2..806597d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +calamares-settings-ubuntu (27) cosmic; urgency=medium + + * Add missing identifiers for urllib exception handling. + + -- Walter Lapchynski Mon, 15 Oct 2018 21:01:34 -0700 + calamares-settings-ubuntu (26) cosmic; urgency=medium * Lubuntu: fix check for EFI architecture.