Skip to content

Commit

Permalink
style: change status in finally
Browse files Browse the repository at this point in the history
  • Loading branch information
F33RNI committed Apr 2, 2024
1 parent 0f46cf2 commit 0f00ce6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/lmao/module_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,9 @@ def response_stop(self) -> None:
try:
self._module_class.response_stop()

# Reset status
self.status = STATUS_IDLE

# Clear status back to IDLE and re-raise exception
except Exception as e:
# Clear status back to IDLE
finally:
self.status = STATUS_IDLE
raise e

def delete_conversation(self, conversation: Dict) -> None:
"""Wrapper for conversation_delete() function
Expand Down

0 comments on commit 0f00ce6

Please sign in to comment.