From 315725a3ac641f0b8bbd49220ab334abe9e39958 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 17 May 2015 00:48:15 +0200 Subject: [PATCH] Print info with --no-err-windows on earlyinit errs. --- qutebrowser/misc/earlyinit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index 0416ed9a1..3bc214389 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -80,11 +80,13 @@ def _die(message, exception=None): """ from PyQt5.QtWidgets import QApplication, QMessageBox from PyQt5.QtCore import Qt - if '--debug' in sys.argv and exception is not None: + if (('--debug' in sys.argv or '--no-err-windows' in sys.argv) and + exception is not None): print(file=sys.stderr) traceback.print_exc() app = QApplication(sys.argv) if '--no-err-windows' in sys.argv: + print(message, file=sys.stderr) print("Exiting because of --no-err-windows.", file=sys.stderr) else: message += '


Error:
{}'.format(exception)