[PATCH] URL installs: remove hasFile("") check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Specialised proxies like apt-cacher-ng disallow directory listing.
OSDistro subclasses do have checks for known files and they are
sufficient.
---
 virtinst/urlfetcher.py | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
index 5a8a98d..25f7066 100644
--- a/virtinst/urlfetcher.py
+++ b/virtinst/urlfetcher.py
@@ -125,15 +125,10 @@ class _URIImageFetcher(_ImageFetcher):
     Base class for downloading from FTP / HTTP
     """
     def hasFile(self, filename):
         raise NotImplementedError
 
-    def prepareLocation(self):
-        if not self.hasFile(""):
-            raise ValueError(_("Opening URL %s failed.") %
-                              (self.location))
-
 
 class _HTTPImageFetcher(_URIImageFetcher):
     def hasFile(self, filename):
         try:
             path = self._make_path(filename)
-- 
2.1.2.457.g0cd6422

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux