Skip to content

Commit

Permalink
package.py - Fixed issue with zip renaming on Win platform
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinbelczewski authored and ahlinc committed Jun 16, 2020
1 parent 3c1ca8a commit cf507ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,12 @@ def open(self):
return self

def close(self, failed=False):
self._zip.close()
self._zip = None
if failed:
os.unlink(self._tmp_filename)
else:
os.replace(self._tmp_filename, self.filename)
self._zip = None

def __enter__(self):
return self.open()
Expand Down

0 comments on commit cf507ea

Please sign in to comment.