From f38dda5f16005347120838adf5b5d9b736697414 Mon Sep 17 00:00:00 2001 From: Fritz Reichwald Date: Wed, 28 Dec 2016 02:23:35 +0100 Subject: [PATCH] Fix html_fallback and logged error message --- qutebrowser/utils/jinja.py | 72 +++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/qutebrowser/utils/jinja.py b/qutebrowser/utils/jinja.py index 16ccb2959..b3f491ad9 100644 --- a/qutebrowser/utils/jinja.py +++ b/qutebrowser/utils/jinja.py @@ -34,45 +34,37 @@ from PyQt5.QtCore import QUrl html_fallback = """ - - - {{ title }} - {% if icon %} - - {% endif %} - - - -
- - - - - -
- - -

The error.html template could not be found!
Please check your qutebrowser installation

-%ERROR%

-

Unable to load page

- Error while opening {{ url }}:
-

{{ error }}



- -
- -
- -
-
- + + + {{ title }} + {% if icon %} + + {% endif %} + + + +
+ + + + + +
+ + +

The error.html template could not be found!
Please check your qutebrowser installation

+ %ERROR%

+
+
+ """ @@ -93,7 +85,7 @@ class Loader(jinja2.BaseLoader): source = utils.read_file(path) except OSError as e: source = html_fallback.replace("%ERROR%", html.escape(str(e))) - log.misc.error("The error.html template could not be found" + path) + log.misc.error("The error.html template could not be found at " + path) # Currently we don't implement auto-reloading, so we always return True # for up-to-date. return source, path, lambda: True