diff --git a/osc-check_repo.py b/osc-check_repo.py index bae4a9a5..8062e2a6 100644 --- a/osc-check_repo.py +++ b/osc-check_repo.py @@ -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