From: Michael Tremer Date: Sat, 8 Apr 2017 13:53:08 +0000 (+0200) Subject: http: Actually write downloaded file to disk X-Git-Tag: 0.9.28~1285^2~1355 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2eb2b4f8344aab5168e22c9e20bd29935bcc8e44;p=pakfire.git http: Actually write downloaded file to disk This was just unreachable code because of wrong indentation Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/http.py b/src/pakfire/http.py index b99c09adf..be4619320 100644 --- a/src/pakfire/http.py +++ b/src/pakfire/http.py @@ -364,9 +364,9 @@ class Client(object): # Otherwise raise this error raise e - # Downloaded succeeded, writing data to filesystem - with open(filename, "wb") as output: - shutil.copyobj(f, output) + # Downloaded succeeded, writing data to filesystem + with open(filename, "wb") as output: + shutil.copyfileobj(f, output) finally: # Re-add any skipped mirrors again so that the next