Change implementation of cleanup in case of clone failure during "repo init"

Fix includes:
1. It deletes only .repo/repo instead of the whole .repo repository.

Bug: Issue 161
Change-Id: I1ab8caa7538fec5e6206d1b029f63bd3f60dedcd
This commit is contained in:
Mani Chandel 2014-09-03 13:54:48 +05:30
parent bf0b0cbc2f
commit f75870beac

2
repo
View File

@ -738,7 +738,7 @@ def main(orig_args):
try:
_Init(args)
except CloneFailure:
shutil.rmtree(repodir, ignore_errors=True)
shutil.rmtree(os.path.join(repodir, S_repo), ignore_errors=True)
sys.exit(1)
repo_main, rel_repo_dir = _FindRepo()
else: