do not fail bulding wip branch when clone doesn't exist already

This commit is contained in:
Frédéric Péters 2015-09-10 22:37:41 +02:00
parent 62aabff038
commit ebb07e98cf
1 changed files with 2 additions and 1 deletions

View File

@ -393,7 +393,8 @@ def main():
git_project_path = os.path.join(settings.GIT_PATH, os.path.basename(project_name))
atexit.register(clean_git_on_exit, git_project_path)
if options.branch.startswith('wip/'):
shutil.rmtree(git_project_path)
if os.path.exists(git_project_path):
shutil.rmtree(git_project_path)
if os.path.exists(git_project_path):
os.chdir(git_project_path)
call("git checkout --quiet %s" % options.branch)