Skip to content

Commit

Permalink
cleanup galaxy tools repo directory in case of unexpected exception (#68
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dsavchenko committed May 30, 2024
1 parent aa69218 commit e67b5e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion odabot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,12 @@ def repo_file_path_if_available(filename):
oda_bot_runtime['deployed_tools'] = deployed_tools
with open(state_storage, 'w') as fd:
yaml.dump(oda_bot_runtime, fd)
except:
except:
logger.error("unexpected exception: %s", traceback.format_exc())
logger.error("Cleanup all changes in the repo directory")
sp.run(['git', 'clean', '-fd'])
logger.error("continue with the next repo")

continue

except Exception:
Expand Down

0 comments on commit e67b5e3

Please sign in to comment.