diff options
-rw-r--r-- | comps.py | 12 | ||||
-rw-r--r-- | urlinstall.py | 24 |
2 files changed, 2 insertions, 34 deletions
@@ -722,17 +722,7 @@ class ComponentSet: log("OSError %s occurred getting %s: %s", filename, errnum, str(msg)) else: - # sanity check result - sometimes FTP doesnt - # catch a file is missing - try: - clen = file.info()['content-length'] - except: - clen = 0 - - if clen > 0: - connected = 1 - else: - log("Error occurred getting %s", filename) + connected = 1 if not connected: time.sleep(5) diff --git a/urlinstall.py b/urlinstall.py index 8d0b2ae1b..4a8a28040 100644 --- a/urlinstall.py +++ b/urlinstall.py @@ -43,17 +43,6 @@ def urlretrieve(location, file): raise IOError(e.code, e.msg) except urllib2.URLError, e: raise IOError(-1, e.reason) - else: - # sanity check result - sometimes FTP doesnt - # catch a file is missing - try: - clen = url.info()['content-length'] - except Exception, e: - log("exception %s getting content-length" %(e,)) - clen = 0 - - if clen < 1: - raise IOError(-1, "File not found") f = open(file, 'w+') f.write(url.read()) @@ -149,18 +138,7 @@ class UrlInstallMethod(InstallMethod): log("IOError %s occurred getting %s: %s", errnum, hdurl, msg) else: - # sanity check result - sometimes FTP doesnt - # catch a file is missing - try: - clen = url.info()['content-length'] - except Exception, e: - log("readHeaders(): exception %s getting content-length" %(e,)) - clen = 0 - - if clen < 1: - log("File %s not found.", hdurl) - else: - break + break time.sleep(5) tries = tries + 1 |