Fix exception hook

This commit is contained in:
Florian Bruhin 2014-01-28 16:13:13 +01:00
parent 0fb496389f
commit 7d8fdec1fd

View File

@ -63,12 +63,12 @@ class QuteBrowser(QApplication):
self.mainwindow.show() self.mainwindow.show()
self.python_hacks() self.python_hacks()
def tmp_exception_hook(exctype, value, traceback): def tmp_exception_hook(self, exctype, value, traceback):
"""Exception hook while initializing, simply exit""" """Exception hook while initializing, simply exit"""
sys.__excepthook__(exctype, value, traceback) sys.__excepthook__(exctype, value, traceback)
self.exit(1) self.exit(1)
def exception_hook(exctype, value, traceback): def exception_hook(self, exctype, value, traceback):
"""Try very hard to write open tabs to a file and exit gracefully""" """Try very hard to write open tabs to a file and exit gracefully"""
sys.__excepthook__(exctype, value, traceback) sys.__excepthook__(exctype, value, traceback)
try: try: