oops, forgot to check before removing

This commit is contained in:
wwoods@test158.test.redhat.com 2007-02-12 16:29:19 -05:00 committed by Jesse Keating
parent 6e9172720a
commit bc1a73ace4
1 changed files with 2 additions and 1 deletions

View File

@ -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