Skip to content

Commit

Permalink
Always unlink zip file after handling
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Nov 13, 2024
1 parent 59f3835 commit f403d8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/workers/manage_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ def unpack_from_zip(self, archive_path):
with zipfile.ZipFile(archive_path, "r") as archive_file:
archive_file.extractall(temp_name)
except Exception as e:
archive_path.unlink()
return self.extension_log.error(f"Could not extract extension zip archive {archive_path.name}: {e}. Cannot "
f"install."), None
finally:
archive_path.unlink()

return temp_name, extension_name

Expand Down

0 comments on commit f403d8b

Please sign in to comment.