Page MenuHomeLubuntu Development

Fix UnboundLocalError in automirror module

Authored by apt-ghetto on Sep 8 2019, 10:03 AM.



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 ""

Diff Detail

rCALASETTINGS Ubuntu Calamares Settings
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

apt-ghetto created this revision.

Nice catch. To be fair, there's a lot of url and error variables thrown around that aren't the same and this makes the code really unreadable and unmaintainable. If you wanted to go ahead and fix that, using, e.g. httperror instead of error for the HTTPError exception, that would be an added plus.

This revision is now accepted and ready to land.Sep 8 2019, 5:57 PM

Thanks for picking up on this. LGTM

This revision was automatically updated to reflect the committed changes.