From bc1a73ace42b14ecad1e8cec5e090f074da999f8 Mon Sep 17 00:00:00 2001 From: "wwoods@test158.test.redhat.com" <> Date: Mon, 12 Feb 2007 16:29:19 -0500 Subject: [PATCH] oops, forgot to check before removing --- pypungi/gather.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pypungi/gather.py b/pypungi/gather.py index 5b24c0c7..1c3950de 100755 --- a/pypungi/gather.py +++ b/pypungi/gather.py @@ -191,7 +191,8 @@ class Gather(yum.YumBase): if not self.config.has_option('default', 'quiet'): self.logger.info("%s already exists and appears to be complete" % local) target=os.path.join(pkgdir, os.path.basename(remote)) - os.remove(target) # avoid traceback after interrupted download + if os.path.exists(target): + os.remove(target) # avoid traceback after interrupted download os.link(local, target) continue