mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:09:00 +08:00
Added correct exception handling for .curaprofile importing
CURA-2252
This commit is contained in:
parent
6c6ced4048
commit
d7d1804319
@ -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):
|
||||
archive = zipfile.ZipFile(file_name, "r")
|
||||
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…
x
Reference in New Issue
Block a user