From ab30124bd0b7d2d602d262bf526f22423332ec10 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 9 Sep 2016 17:00:13 +0200 Subject: [PATCH] Remove (hopefully) dead download code If the percentage is None, remaining/total should always be None too (as percentage/remaining being None should be triggered by total being None). --- qutebrowser/browser/webkit/downloads.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/qutebrowser/browser/webkit/downloads.py b/qutebrowser/browser/webkit/downloads.py index 9b641c4f9..17a234447 100644 --- a/qutebrowser/browser/webkit/downloads.py +++ b/qutebrowser/browser/webkit/downloads.py @@ -352,10 +352,7 @@ class DownloadItem(QObject): return ('{index}: {name} [{speed:>10}|{down}]{errmsg}'.format( index=self.index, name=self.basename, speed=speed, down=down, errmsg=errmsg)) - if perc is None: - perc = '??' - else: - perc = round(perc) + perc = round(perc) if remaining is None: remaining = '?' else: