From: Yonghee Han Date: Mon, 28 Nov 2016 02:22:24 +0000 (+0900) Subject: Cleanup repo directory when have a previous directory X-Git-Tag: submit/trunk/20190927.012743~574^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F100357%2F2;p=services%2Fjenkins-scripts.git Cleanup repo directory when have a previous directory Change-Id: Ie69a78384c970f6a62b1377ed69c80be7ea0ffb8 --- diff --git a/job_pre_release_obs.py b/job_pre_release_obs.py index 70c77c2..6bad059 100755 --- a/job_pre_release_obs.py +++ b/job_pre_release_obs.py @@ -157,6 +157,11 @@ def make_repo(project, repo, backenddb, base_url, base_path, project.replace(':', ':/')) targets = snapshot.targets + # Cleanup repo directory + if os.path.isdir(os.path.join(prerelease.path, prerelease.build_id)): + print " repo path=%s exits. Cleanup repo directory" % os.path.join(prerelease.path, prerelease.build_id) + shutil.rmtree(os.path.join(prerelease.path, prerelease.build_id)) + if buildmonitor_enabled: global bm_snapshot_name global bm_snapshot_url