From 2e419d413bfd10c603759770c74a198cb5428c69 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 16 Sep 2014 07:34:27 +0200 Subject: [PATCH] Catch exceptions in version.version() in CrashDialog. --- qutebrowser/widgets/crash.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/widgets/crash.py b/qutebrowser/widgets/crash.py index 237912378..87524dab6 100644 --- a/qutebrowser/widgets/crash.py +++ b/qutebrowser/widgets/crash.py @@ -126,7 +126,10 @@ class _CrashDialog(QDialog): except Exception as e: # pylint: disable=broad-except self._crash_info.append(("Contact info", "User: {}: {}".format( e.__class__.__name__, e))) - self._crash_info.append(("Version info", version.version())) + try: + self._crash_info.append(("Version info", version.version())) + except Exception as e: # pylint: disable=broad-except + self._crash_info.append(("Version info", traceback.format_exc())) try: self._crash_info.append(("Config", config.instance().dump_userconfig()))