summaryrefslogtreecommitdiffstats
path: root/urlinstall.py
diff options
context:
space:
mode:
Diffstat (limited to 'urlinstall.py')
-rw-r--r--urlinstall.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/urlinstall.py b/urlinstall.py
index 5851e5014..2957bbe5a 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -68,6 +68,30 @@ class UrlInstallMethod(InstallMethod):
return file
+ def copyFileToTemp(self, filename):
+ tmppath = self.getTempPath()
+
+ if self.multiDics:
+ base = "%s/disc1" % (self.pkgUrl,)
+ else:
+ base = self.pkgUrl
+ fullPath = base + filename
+
+ file = tmppath + os.path.basename(fullPath)
+
+ connected = 0
+ while not connected:
+ try:
+ urllib.urlretrieve(fullPath, file)
+ except IOError, (errnum, msg):
+ log("IOError %s occurred getting %s: %s",
+ errnum, fullPath, str(msg))
+ time.sleep(5)
+ else:
+ connected = 1
+
+ return file
+
def unlinkFilename(self, fullName):
os.remove(fullName)