From bc1a73ace42b14ecad1e8cec5e090f074da999f8 Mon Sep 17 00:00:00 2001 From: wwoods@test158.test.redhat.com <> Date: Feb 12 2007 21:29:19 +0000 Subject: oops, forgot to check before removing --- diff --git a/pypungi/gather.py b/pypungi/gather.py index 5b24c0c..1c3950d 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