Skip to content

Commit

Permalink
Also properly close tempfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Posselt committed Jun 23, 2016
1 parent bbe175b commit eacb09a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nextcloudappstore/core/api/v1/release/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ def _stream_to_file(self, file: Any, max_size: int,
finished = True
finally:
# in case any errors occurred, get rid of the file
file.close()
if not finished:
os.remove(file.name)

0 comments on commit eacb09a

Please sign in to comment.