~ubuntu-branches/ubuntu/precise/jockey/precise-updates

« back to all changes in this revision

Viewing changes to jockey/oslib.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-04-02 17:24:11 UTC
  • Revision ID: package-import@ubuntu.com-20120402172411-cfexfzey2v29mbi8
Tags: 0.9.7-0ubuntu4
* jockey/oslib.py, install_packages: Temporarily disable our Apport (or any
  other) excepthook for apt.Cache().commit(), to circumvent python-apt's
  magic of calling the except hook without a stack trace in case of
  package installation failures. We already catch SystemErrors from this
  call and act accordingly. (LP: #850005)
* Merge updated translations from trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
            inst_p = progress_cb and MyInstallProgress(progress_cb) or None
328
328
            try:
329
329
                try:
 
330
                    orig_excepthook = sys.excepthook
 
331
                    sys.excepthook = sys.__excepthook__
330
332
                    c.commit(progress_cb and MyFetchProgress(progress_cb) or None, inst_p)
331
333
                finally:
 
334
                    sys.excepthook = orig_excepthook
332
335
                    if inst_p and inst_p.out:
333
336
                        inst_p.out.seek(0)
334
337
                        apt_out = inst_p.out.read().decode('UTF-8', errors='replace')