summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--virtinst/install/urlfetcher.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py
index 6084bf01..e52efc8e 100644
--- a/virtinst/install/urlfetcher.py
+++ b/virtinst/install/urlfetcher.py
@@ -365,11 +365,13 @@ class _LocalURLFetcher(_URLFetcher):
For grabbing files from a local directory
"""
def _hasFile(self, url):
- return os.path.exists(url)
+ parsed = urllib.parse.urlparse(url)
+ return os.path.exists(parsed.path)
def _grabber(self, url):
- urlobj = open(url, "rb")
- size = os.path.getsize(url)
+ parsed = urllib.parse.urlparse(url)
+ urlobj = open(parsed.path, "rb")
+ size = os.path.getsize(parsed.path)
return urlobj, size