From d09747a33a91c52d1ce4774c525d92f1f4bd145e Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Wed, 30 Oct 2013 22:34:23 +0200 Subject: [PATCH] Fixed the problems with the exception form. Not sure how to test it though... --- openlp/core/__init__.py | 3 ++- openlp/core/ui/exceptionform.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index 7d198db5e..4bb0f0d28 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -184,7 +184,8 @@ class OpenLP(QtGui.QApplication): ``traceback`` A traceback object with the details of where the exception occurred. """ - log.exception(''.join(format_exception(exctype, value, traceback))) + # We can't log.exception here because the last exception no longer exists, we're actually busy handling it. + log.critical(''.join(format_exception(exctype, value, traceback))) if not hasattr(self, 'exception_form'): self.exception_form = ExceptionForm() self.exception_form.exception_text_edit.setPlainText(''.join(format_exception(exctype, value, traceback))) diff --git a/openlp/core/ui/exceptionform.py b/openlp/core/ui/exceptionform.py index b2427e009..f1e57a545 100644 --- a/openlp/core/ui/exceptionform.py +++ b/openlp/core/ui/exceptionform.py @@ -101,7 +101,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog): """ Constructor. """ - super(ExceptionForm, self).__init__(self.main_window) + super(ExceptionForm, self).__init__() self.setupUi(self) self.settings_section = 'crashreport'