From 20eae4d671642413aa5008ae1d3e185d69b89a10 Mon Sep 17 00:00:00 2001 From: thuck Date: Mon, 7 Nov 2016 08:11:47 +0100 Subject: [PATCH] Modifed exception structure --- qutebrowser/mainwindow/tabwidget.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index a6d56014b..bfdf53e45 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -448,12 +448,14 @@ class TabBar(QTabBar): #TODO: relative size and/or configured one try: tab = objreg.get('tab', scope='tab', window=self._win_id, tab=index) + except KeyError: + pass + else: if tab.data.pinned: size = QSize(40, height) qtutils.ensure_valid(size) return size - except KeyError: - pass + # If we *do* have enough space, tabs should occupy the whole window # width. #looks like this generates high cpu usage