summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2009-03-10 18:24:17 -0400
committerWill Woods <wwoods@redhat.com>2009-03-10 18:24:17 -0400
commit2ee42b3c2c4d93e13acb533e9b1551556b096c3d (patch)
tree84bdcf680105bde91e78d1ad2d6ae4610b0baa8e
parent35942039711b2007bbb259de1f0107f313c85c72 (diff)
downloaddebuginfofs-2ee42b3c2c4d93e13acb533e9b1551556b096c3d.zip
debuginfofs-2ee42b3c2c4d93e13acb533e9b1551556b096c3d.tar.gz
debuginfofs-2ee42b3c2c4d93e13acb533e9b1551556b096c3d.tar.xz
Handle package download errors cleanly
-rwxr-xr-xserver/debuginfofs-mirror7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/debuginfofs-mirror b/server/debuginfofs-mirror
index 154a06c..ef66633 100755
--- a/server/debuginfofs-mirror
+++ b/server/debuginfofs-mirror
@@ -338,8 +338,11 @@ def main():
for p in unpack_packages + download_packages:
if p in download_packages:
repo = y.repos.getRepo(p.repoid)
- # FIXME handle possible errors here
- repo.getPackage(p)
+ try:
+ repo.getPackage(p)
+ except yum.Errors.RepoError, e:
+ y.logger.error(str(e))
+ y.logger.error("Can't download %s; skipping" % pkg_to_nevra(p))
if opt.download_only:
continue
local = p.localpath