diff --git a/tests/test_urls.py b/tests/test_urls.py index ff0447aa..e53c465f 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -53,11 +53,11 @@ OLD_OPENSUSE_URL = "http://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/% OPENSUSE_URL = "http://download.opensuse.org/distribution/%s/repo/oss/" OLD_UBUNTU_URL = "http://old-releases.ubuntu.com/ubuntu/dists/%s/main/installer-%s" -UBUNTU_URL = "http://us.archive.ubuntu.com/ubuntu/dists/%s/main/installer-%s" +UBUNTU_URL = "http://us.archive.ubuntu.com:80/ubuntu/dists/%s/main/installer-%s" OLD_DEBIAN_URL = "http://archive.debian.org/debian/dists/%s/main/installer-%s/" DAILY_DEBIAN_URL = "http://d-i.debian.org/daily-images/%s/" -DEBIAN_URL = "ftp://ftp.us.debian.org/debian/dists/%s/main/installer-%s/" +DEBIAN_URL = "ftp://ftp.us.debian.org:21/debian/dists/%s/main/installer-%s/" MAGEIA_URL = "http://distro.ibiblio.org/mageia/distrib/%s/%s" diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py index 611c8579..a4e36415 100644 --- a/virtinst/urlfetcher.py +++ b/virtinst/urlfetcher.py @@ -218,8 +218,9 @@ class _FTPURLFetcher(_URLFetcher): return try: - server = urlparse.urlparse(self.location)[1] - self._ftp = ftplib.FTP(server) + parsed = urlparse.urlparse(self.location) + self._ftp = ftplib.FTP() + self._ftp.connect(parsed.hostname, parsed.port) self._ftp.login() except Exception, e: raise ValueError(_("Opening URL %s failed: %s.") %