mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Added correct exception handling for .curaprofile importing
CURA-2252
This commit is contained in:
parent
6c6ced4048
commit
d7d1804319
1 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,11 @@ class CuraProfileReader(ProfileReader):
|
|||
# not be read or didn't contain a valid profile, \code None \endcode is
|
||||
# returned.
|
||||
def read(self, file_name):
|
||||
try:
|
||||
archive = zipfile.ZipFile(file_name, "r")
|
||||
except Exception:
|
||||
# zipfile doesn't give proper exceptions, so we can only catch broad ones
|
||||
return []
|
||||
results = []
|
||||
for profile_id in archive.namelist():
|
||||
# Create an empty profile.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue