[yum-cvs] yumdownloader.py
Seth Vidal
skvidal at linux.duke.edu
Thu Oct 25 18:28:18 UTC 2007
yumdownloader.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 5d1b40e28fff8bdd6d29544f1814d37cdc46afa3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Oct 25 14:24:29 2007 -0400
catch error on download if destdir is not writable.
closed rh bug 352911
diff --git a/yumdownloader.py b/yumdownloader.py
index cc623a9..026451b 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -185,7 +185,12 @@ class YumDownloader(YumUtilBase):
# Disable cache otherwise things won't download
repo.cache = 0
download.localpath = local # Hack: to set the localpath we want.
- path = repo.getPackage(download)
+ try:
+ path = repo.getPackage(download)
+ except IOError, e:
+ self.logger.error("Cannot write to file %s. Error was: %s" % (local, e))
+ continue
+
if not os.path.exists(local) or not os.path.samefile(path, local):
progress = TextMeter()
More information about the Yum-cvs-commits
mailing list