virt-manager/3009888a-urlfetcher-Dont-override-fullurl-when-its-explicitly-set.patch
Charles Arnold 7a4cac2ed8 - Upstream bug fixes (bsc#1027942)
0c223ab2-guest-Dont-set-default-uefi-if-firmware-is-set.patch
  414ffa5e-virt-install-Use-minutes-instead-of-seconds-on-get_time_string.patch
  53245827-urlfetcher-Force-a-flush-after-writing-to-a-file.patch
  3009888a-urlfetcher-Dont-override-fullurl-when-its-explicitly-set.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=482
2019-08-27 20:01:01 +00:00

28 lines
1.2 KiB
Diff

Subject: urlfetcher: Don't override fullurl when it's explicitly set
From: Fabiano Fidêncio fidencio@redhat.com Fri Aug 2 17:01:44 2019 +0200
Date: Tue Aug 6 17:59:05 2019 -0400:
Git: 3009888a0ed200a4f472dd32239a7c5157fef391
acquireFile method receives an optional "fullurl" argument. In case it's
not passed, its value is set as the same value of the filename. However,
when fullurl is passed, it should be used and not overriden by the
filename, otherwise fetcher.acquireFile() will just bail.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py
index 07f8b5ea..6084bf01 100644
--- a/virtinst/install/urlfetcher.py
+++ b/virtinst/install/urlfetcher.py
@@ -411,7 +411,8 @@ class DirectFetcher(_URLFetcher):
return filename
def acquireFile(self, filename, fullurl=None):
- fullurl = filename
+ if not fullurl:
+ fullurl = filename
filename = os.path.basename(filename)
fetcher = fetcherForURI(fullurl, self.scratchdir, self.meter, direct=True)
return fetcher.acquireFile(filename, fullurl) # pylint: disable=protected-access