reset delete-flag

Since 'PathFormat' objects are being reused, setting `delete`
to True once caused all files downloaded after to be deleted as well.
This commit is contained in:
Mike Fährmann
2018-06-20 18:12:59 +02:00
parent 91340d9d27
commit a9e276bc37
2 changed files with 3 additions and 0 deletions

View File

@@ -474,6 +474,7 @@ class PathFormat():
def finalize(self):
"""Move tempfile to its target location"""
if self.delete:
self.delete = False
os.unlink(self.temppath)
return