[Bug 1632047] [NEW] DistUpgradeViewNonInteractive except hook hides the traceback

Brian Murray brian at ubuntu.com
Mon Oct 10 18:03:00 UTC 2016


Public bug reported:

The non-interactive version of the dist upgrade process has its own
special except hook handler, but that handler ends up hiding the
traceback.  This should be fixed so that we have more details about why
the upgrade failed.  Here's the code in question:

249 class DistUpgradeViewNonInteractive(DistUpgradeView):
250     " non-interactive version of the upgrade view "
251     def __init__(self, datadir=None, logdir=None):
252         DistUpgradeView.__init__(self)
253         self.config = DistUpgradeConfig(".")
254         self._acquireProgress = NonInteractiveAcquireProgress()
255         self._installProgress = NonInteractiveInstallProgress(logdir)
256         self._opProgress = apt.progress.base.OpProgress()
257         sys.__excepthook__ = self.excepthook
258     def excepthook(self, type, value, traceback):
259         " on uncaught exceptions -> print error and reboot "
260         logging.exception("got exception '%s': %s " % (type, value))
261         #sys.excepthook(type, value, traceback)
262         self.confirmRestart()

Notice nothing is done with traceback in line 260.

** Affects: ubuntu-release-upgrader (Ubuntu)
     Importance: High
     Assignee: Brian Murray (brian-murray)
         Status: Triaged

** Affects: ubuntu-release-upgrader (Ubuntu Yakkety)
     Importance: High
     Assignee: Brian Murray (brian-murray)
         Status: Triaged

** Changed in: ubuntu-release-upgrader (Ubuntu)
       Status: New => Triaged

** Changed in: ubuntu-release-upgrader (Ubuntu)
   Importance: Undecided => High

** Also affects: ubuntu-release-upgrader (Ubuntu Yakkety)
   Importance: High
       Status: Triaged

** Changed in: ubuntu-release-upgrader (Ubuntu Yakkety)
     Assignee: (unassigned) => Brian Murray (brian-murray)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1632047

Title:
  DistUpgradeViewNonInteractive except hook hides the traceback

Status in ubuntu-release-upgrader package in Ubuntu:
  Triaged
Status in ubuntu-release-upgrader source package in Yakkety:
  Triaged

Bug description:
  The non-interactive version of the dist upgrade process has its own
  special except hook handler, but that handler ends up hiding the
  traceback.  This should be fixed so that we have more details about
  why the upgrade failed.  Here's the code in question:

  249 class DistUpgradeViewNonInteractive(DistUpgradeView):
  250     " non-interactive version of the upgrade view "
  251     def __init__(self, datadir=None, logdir=None):
  252         DistUpgradeView.__init__(self)
  253         self.config = DistUpgradeConfig(".")
  254         self._acquireProgress = NonInteractiveAcquireProgress()
  255         self._installProgress = NonInteractiveInstallProgress(logdir)
  256         self._opProgress = apt.progress.base.OpProgress()
  257         sys.__excepthook__ = self.excepthook
  258     def excepthook(self, type, value, traceback):
  259         " on uncaught exceptions -> print error and reboot "
  260         logging.exception("got exception '%s': %s " % (type, value))
  261         #sys.excepthook(type, value, traceback)
  262         self.confirmRestart()

  Notice nothing is done with traceback in line 260.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1632047/+subscriptions



More information about the foundations-bugs mailing list