diff options
author | Erik Troan <ewt@redhat.com> | 2000-10-31 19:13:02 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-10-31 19:13:02 +0000 |
commit | 61173321100db104032feb8949cba5332533a36d (patch) | |
tree | ba92c202bcfb18aee75db9ce1d3d8bf7364790bc /comps.py | |
parent | 38bff542dda01d79d7e1ee2786c0255cb52fe128 (diff) | |
download | anaconda-61173321100db104032feb8949cba5332533a36d.tar.gz anaconda-61173321100db104032feb8949cba5332533a36d.tar.xz anaconda-61173321100db104032feb8949cba5332533a36d.zip |
check for socket errors w/ we can't open the comps file
Diffstat (limited to 'comps.py')
-rw-r--r-- | comps.py | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -6,6 +6,7 @@ import types import urllib from translate import _ from translate import N_ +from log import log XFreeServerPackages = { 'XFree86-3DLabs' : 1, 'XFree86-8514' : 1, 'XFree86-AGX' : 1, 'XFree86-I128' : 1, @@ -351,7 +352,18 @@ class ComponentSet: # arch2 = "sparc64" # arch2 = os.uname ()[4] - file = urllib.urlopen(filename) + + connected = 0 + while not connected: + try: + file = urllib.urlopen(filename) + except IOError, (errnum, msg): + log("IOError %s occured getting %s: %s", filename, + errnum, str(msg)) + time.sleep(5) + else: + connected = 1 + lines = file.readlines() file.close() |