diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-11-04 22:33:34 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-11-04 22:33:34 +0000 |
commit | d8d6e8cef165d038c6c4243c9d4339cb05ea73f0 (patch) | |
tree | 2eefdf1ecfbf92c38b8f7a996bc75e9f1ed80a40 /image.py | |
parent | a6745e390cc2d9883a118353bb377c98afcfcd0e (diff) | |
download | anaconda-d8d6e8cef165d038c6c4243c9d4339cb05ea73f0.tar.gz anaconda-d8d6e8cef165d038c6c4243c9d4339cb05ea73f0.tar.xz anaconda-d8d6e8cef165d038c6c4243c9d4339cb05ea73f0.zip |
add FileCopyException to be used when we have IO errors grabbing packages
or when pulling packages from a remote site.
also, fix ts.setProbFilter
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -12,7 +12,7 @@ # from comps import ComponentSet, HeaderListFromFile -from installmethod import InstallMethod +from installmethod import InstallMethod, FileCopyException import iutil import os import isys @@ -251,9 +251,9 @@ class CdromInstallMethod(ImageInstallMethod): pass tmppath = self.getTempPath() - copied = 0 + tries = 0 # FIXME: should retry a few times then prompt for new cd - while not copied: + while tries < 5: try: shutil.copy(self.tree + "/RedHat/RPMS/" + h[1000000], tmppath + h[1000000]) @@ -262,7 +262,11 @@ class CdromInstallMethod(ImageInstallMethod): errnum, h[1000000], str(msg)) time.sleep(5) else: - copied = 1 + break + tries = tries + 1 + + if tries >= 5: + raise FileCopyException return tmppath + h[1000000] |