From 2ed3f722f5cbe2ee15d4fb9a79803069a27c7fe7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 7 Feb 2014 12:54:39 +0100 Subject: [PATCH] Catch AttributeError when opening unknown about: pages --- qutebrowser/widgets/browser.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/qutebrowser/widgets/browser.py b/qutebrowser/widgets/browser.py index e57bbc909..662873848 100644 --- a/qutebrowser/widgets/browser.py +++ b/qutebrowser/widgets/browser.py @@ -432,9 +432,14 @@ class BrowserTab(QWebView): logging.debug('New title: {}'.format(qurl.url())) self.titleChanged.emit(qurl.url()) if utils.is_about_url(qurl): - content = about.handle(qurl.toString()) - self.setUrl(qurl) - self.setContent(content, 'text/html') + try: + content = about.handle(qurl.toString()) + except AttributeError: + # FIXME progress bar should be visible and red... + self.loadFinished.emit(False) + else: + self.setUrl(qurl) + self.setContent(content, 'text/html') return else: return self.load(qurl)