From 2eb2b4f8344aab5168e22c9e20bd29935bcc8e44 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 8 Apr 2017 15:53:08 +0200 Subject: [PATCH] http: Actually write downloaded file to disk This was just unreachable code because of wrong indentation Signed-off-by: Michael Tremer --- src/pakfire/http.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5