Skip to content

Commit

Permalink
fix: Dont raise FileNotFoundError from close() on tmpfile rename (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjinno authored Mar 29, 2024
1 parent 4cf383e commit 58ba987
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ def open(self):
def close(self, failed=False):
self._zip.close()
self._zip = None
if not os.exists(self._tmp_filename):
return
if failed:
os.unlink(self._tmp_filename)
else:
Expand Down

0 comments on commit 58ba987

Please sign in to comment.