mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Zipfile is now closed when it's done loading
CURA-2252
This commit is contained in:
parent
45a841a52b
commit
96a1aafb80
1 changed files with 9 additions and 9 deletions
|
@ -27,7 +27,7 @@ class CuraProfileReader(ProfileReader):
|
||||||
# returned.
|
# returned.
|
||||||
def read(self, file_name):
|
def read(self, file_name):
|
||||||
try:
|
try:
|
||||||
archive = zipfile.ZipFile(file_name, "r")
|
with zipfile.ZipFile(file_name, "r") as archive:
|
||||||
results = []
|
results = []
|
||||||
for profile_id in archive.namelist():
|
for profile_id in archive.namelist():
|
||||||
with archive.open(profile_id) as f:
|
with archive.open(profile_id) as f:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue