mirror of
https://git.launchpad.net/~ubuntu-qt-code/+git/calamares-settings-ubuntu
synced 2025-03-06 00:31:08 +00:00
Fix UnboundLocalError in automirror module
Summary: When opening an URL, an error may be raised and the wrong, not defined variable was logged. Test Plan: Create an HTTPError or an URLError (socket.timeout), when opening "https://ipapi.co/json" Reviewers: wxl, tsimonq2, kc2bez Reviewed By: wxl, kc2bez Differential Revision: https://phab.lubuntu.me/D42
This commit is contained in:
parent
cd7fa92d15
commit
e647964386
@ -112,10 +112,10 @@ def getcountrycode():
|
||||
localedata = json.loads(url.read().decode())
|
||||
except HTTPError as error:
|
||||
logging.error("Data not retrieved because %s - URL: %s",
|
||||
error, url)
|
||||
error, geoipurl)
|
||||
except URLError as error:
|
||||
if isinstance(error.reason, socket.timeout):
|
||||
logging.error("Socket timed out - URL %s", url)
|
||||
logging.error("Socket timed out - URL %s", geoipurl)
|
||||
else:
|
||||
logging.error("Non-timeout protocol error.")
|
||||
else:
|
||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
calamares-settings-ubuntu (1:19.10.5) eoan; urgency=medium
|
||||
|
||||
* Fix UnboundLocalError in automirror module.
|
||||
|
||||
-- apt-ghetto <apt-ghetto@lubuntu.me> Sun, 08 Sep 2019 11:17:17 +0200
|
||||
|
||||
calamares-settings-ubuntu (1:19.10.4) eoan; urgency=medium
|
||||
|
||||
[ Dan Simmons ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user