Handle checkout errors
This commit is contained in:
parent
9278ff4c96
commit
8889f43a1e
@ -64,7 +64,12 @@ def checkout(repo,version,batch_mode):
|
||||
for tag in git_repo.tags:
|
||||
if not '-' in tag.name:
|
||||
print(f"{repo} {tag.name}")
|
||||
g.checkout(tag.name)
|
||||
try:
|
||||
g.checkout(tag.name)
|
||||
except Exception:
|
||||
print("checkout failed, resetting and cleaning")
|
||||
g.reset('--hard',tag)
|
||||
g.clean('-xfd')
|
||||
dump_rules(repo,tag.name)
|
||||
os.chdir('..')
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user