Skip to content

Commit

Permalink
Do not delete the action data JSON file if an error occurs during the…
Browse files Browse the repository at this point in the history
… final stage
  • Loading branch information
Mikhail Sandakov committed Aug 2, 2024
1 parent 103ffee commit 0af2886
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pleskdistup/common/src/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ def __enter__(self):
return self

def __exit__(self, *kwargs):
if os.path.exists(self.path_to_actions_data):
# Do not remove the actions data if an error occurs because
# customer will likely want to retry after correcting the error on their end
if self.error is not None and os.path.exists(self.path_to_actions_data):
os.remove(self.path_to_actions_data)

def _get_flow(self) -> typing.Dict[str, typing.List[ActiveAction]]:
Expand Down

0 comments on commit 0af2886

Please sign in to comment.