mirror of
https://git.launchpad.net/~ubuntu-qt-code/+git/calamares-settings-ubuntu
synced 2025-06-24 16:11:31 +00:00
Add missing identifiers for urllib exception handling.
This commit is contained in:
parent
8d0c107a0f
commit
3915c9a26f
@ -90,10 +90,10 @@ def getcountry():
|
|||||||
try:
|
try:
|
||||||
with urllib.request.urlopen(geoipurl, timeout=75) as url:
|
with urllib.request.urlopen(geoipurl, timeout=75) as url:
|
||||||
localedata = json.loads(url.read().decode())
|
localedata = json.loads(url.read().decode())
|
||||||
except HTTPError:
|
except HTTPError as error:
|
||||||
logging.error("Data of %s not retrieved because %s - URL: %s",
|
logging.error("Data of %s not retrieved because %s - URL: %s",
|
||||||
name, error, url)
|
name, error, url)
|
||||||
except URLError:
|
except URLError as error:
|
||||||
if isinstance(error.reason, socket.timeout):
|
if isinstance(error.reason, socket.timeout):
|
||||||
logging.error("Socket timed out - URL %s", url)
|
logging.error("Socket timed out - URL %s", url)
|
||||||
else:
|
else:
|
||||||
@ -108,10 +108,10 @@ def getmirror(country):
|
|||||||
try:
|
try:
|
||||||
with urllib.request.urlopen(mirrorlisturl, timeout=75) as url:
|
with urllib.request.urlopen(mirrorlisturl, timeout=75) as url:
|
||||||
mirrors = json.loads(url.read().decode())
|
mirrors = json.loads(url.read().decode())
|
||||||
except HTTPError:
|
except HTTPError as error:
|
||||||
logging.error("Data of %s not retrieved because %s - URL: %s",
|
logging.error("Data of %s not retrieved because %s - URL: %s",
|
||||||
name, error, url)
|
name, error, url)
|
||||||
except URLError:
|
except URLError as error:
|
||||||
if isinstance(error.reason, socket.timeout):
|
if isinstance(error.reason, socket.timeout):
|
||||||
logging.error("Socket timed out - URL %s", url)
|
logging.error("Socket timed out - URL %s", url)
|
||||||
else:
|
else:
|
||||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
calamares-settings-ubuntu (27) cosmic; urgency=medium
|
||||||
|
|
||||||
|
* Add missing identifiers for urllib exception handling.
|
||||||
|
|
||||||
|
-- Walter Lapchynski <wxl@ubuntu.com> Mon, 15 Oct 2018 21:01:34 -0700
|
||||||
|
|
||||||
calamares-settings-ubuntu (26) cosmic; urgency=medium
|
calamares-settings-ubuntu (26) cosmic; urgency=medium
|
||||||
|
|
||||||
* Lubuntu: fix check for EFI architecture.
|
* Lubuntu: fix check for EFI architecture.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user