Comment 2 for bug 1611470

Revision history for this message
MissionSix (missionsix) wrote :

RE: UnboundLocalError: local variable 'e' referenced before assignment

xenial: DistUpgradeControll.py:1257

https://apt-browse.org/browse/ubuntu/xenial/main/all/python3-distupgrade/1:16.04.12/file/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py#1257

        # maximum fetch-retries reached without a successful commit
        logging.error("giving up on fetching after maximum retries")
        self._view.error(_("Could not download the upgrades"),
                         _("The upgrade has aborted. Please check your "\
                           "Internet connection or "\
                           "installation media and try again. "),
                           "%s" % e)

This error message is outside of the exception scope, and within the retry loop. So the `e` here is unbounded.