diff options
author | Florian Bruhin <me@the-compiler.org> | 2019-09-13 17:18:14 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2019-09-13 17:18:14 +0200 |
commit | 96816331a8a506449a63bfb8a5fa1b838822e23d (patch) | |
tree | ce170a9f25056a1096101ff884b92f11c7875572 | |
parent | 216fe37be6049c7c4477c942f77cdd6b8df287b7 (diff) | |
download | qutebrowser-96816331a8a506449a63bfb8a5fa1b838822e23d.tar.gz qutebrowser-96816331a8a506449a63bfb8a5fa1b838822e23d.zip |
Handle unknown values for statusbar.Percentage
-rw-r--r-- | qutebrowser/mainwindow/statusbar/percentage.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qutebrowser/mainwindow/statusbar/percentage.py b/qutebrowser/mainwindow/statusbar/percentage.py index e39b672f2..9a0fd6b40 100644 --- a/qutebrowser/mainwindow/statusbar/percentage.py +++ b/qutebrowser/mainwindow/statusbar/percentage.py @@ -44,7 +44,6 @@ class Percentage(textbase.TextBase): strings = { 0: '[top]', 100: '[bot]', - None: '[???]', } for i in range(1, 100): fmt = '[{:02}]' if raw else '[{:02}%]' @@ -59,7 +58,7 @@ class Percentage(textbase.TextBase): x: The x percentage (int), currently ignored. y: The y percentage (int) """ - self._set_text(self._strings[y]) + self._set_text(self._strings.get(y, '[???]')) def on_tab_changed(self, tab): """Update scroll position when tab changed.""" |