[tahoe-lafs-trac-stream] [tahoe-lafs] #1746: IOError and verbose exceptions trigger Ubuntu crash reporter

tahoe-lafs trac at tahoe-lafs.org
Sun May 20 15:10:16 UTC 2012


#1746: IOError and verbose exceptions trigger Ubuntu crash reporter
---------------------------+-----------------------------------------------
     Reporter:  ChosenOne  |      Owner:  davidsarah
         Type:  defect     |     Status:  new
     Priority:  major      |  Milestone:  undecided
    Component:  code-      |    Version:  1.9.1
  frontend-cli             |   Keywords:  cli ubuntu apport usability error
   Resolution:             |
Launchpad Bug:             |
---------------------------+-----------------------------------------------

Comment (by ChosenOne):

 See files in /etc/python*/sitecustomize.py:
 {{{
 # install the apport exception handler if available
 try:
     import apport_python_hook
 except ImportError:
     pass
 else:
     apport_python_hook.install()
 }}}

 I traced it back into the apport-package, ubuntu provides.
 Installing the hook does the following
 {{{
     sys.excepthook = apport_excepthook
 }}}

 This means that your python environment is modified like this:
 {{{
 print repr(sys.excepthook)
 print sys.excepthook.func_name
 print type(sys.excepthook)'
 # <function apport_excepthook at 0x7fb84e5335f0>
 # apport_excepthook
 # <type 'function'>
 }}}

 A dirty, fix for this ticket could be (untested!)
 {{{
 import sys
 import types # for comparison. can we do this better?
 if types.FunctionType == type(sys.excepthook):
     if sys.excepthook.func_name == 'apport_excepthook':
         sys.excepthook = lambda *x: None

 }}}

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1746#comment:3>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list