From: Michael Tremer Date: Wed, 7 Dec 2016 20:11:34 +0000 (+0100) Subject: http: Only initialize the progress bar once X-Git-Tag: 0.9.28~1285^2~1392 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25ea391e8f3ebcbfbdd3d8346749de0b790c8bca;p=pakfire.git http: Only initialize the progress bar once When a request fails and we move to the next mirror we do not want to show an other progressbar. Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/http.py b/src/pakfire/http.py index 12e0f3530..2f4bb1c1c 100644 --- a/src/pakfire/http.py +++ b/src/pakfire/http.py @@ -288,8 +288,8 @@ class Client(object): self._next_mirror() try: - while True: - with self._make_progressbar(message) as p: + with self._make_progressbar(message) as p: + while True: with open(filename, "wb") as f: # Exclusively lock the file for download try: