Skip to content

Commit

Permalink
fix type handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Mar 9, 2025
1 parent 0fb8993 commit 23188e2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nomenklatura/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,11 @@ def reset(self) -> None:

def flush(self) -> None:
# log.info("Flushing cache.")
if self._conn is not None:
if self._transaction is not None:
try:
self._transaction.commit()
except InvalidRequestError:
log.exception("Transaction was failed, cannot store cache state.")
raise
self._conn.close()
self.reset()

def close(self) -> None:
Expand Down

0 comments on commit 23188e2

Please sign in to comment.