avoid traceback after interrupted download

This commit is contained in:
wwoods@test158.test.redhat.com 2007-02-12 15:57:58 -05:00 committed by Jesse Keating
parent bbe50383dc
commit 6e9172720a

View File

@ -190,7 +190,9 @@ class Gather(yum.YumBase):
if not self.config.has_option('default', 'quiet'):
self.logger.info("%s already exists and appears to be complete" % local)
os.link(local, os.path.join(pkgdir, os.path.basename(remote)))
target=os.path.join(pkgdir, os.path.basename(remote))
os.remove(target) # avoid traceback after interrupted download
os.link(local, target)
continue
# Disable cache otherwise things won't download