Avoid errors when exiting early.

This commit is contained in:
Alberto Planas 2014-07-23 15:34:34 +02:00
parent c4e3bdb5b0
commit f1d2e2d3b0

View File

@ -260,6 +260,10 @@ def _check_repo_group(self, id_, requests, opts):
# continue
# Makes sure to remove the directory is case of early exit.
if os.path.exists(destdir):
shutil.rmtree(destdir)
os.makedirs(destdir)
for rq, _, downloads in dirstolink:
dir_ = destdir + '/%s' % rq.tgt_package