Skip to content

Commit 58ba987

Browse files
authored
fix: Dont raise FileNotFoundError from close() on tmpfile rename (#550)
1 parent 4cf383e commit 58ba987

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

package.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ def open(self):
314314
def close(self, failed=False):
315315
self._zip.close()
316316
self._zip = None
317+
if not os.exists(self._tmp_filename):
318+
return
317319
if failed:
318320
os.unlink(self._tmp_filename)
319321
else:

0 commit comments

Comments
 (0)