mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 00:39:01 +08:00
Catch environment errors when reading 3MF archive metadata
The file could get deleted in the meanwhile. Fixes Sentry issue CURA-1CK.
This commit is contained in:
parent
9ffc6bc705
commit
b740fda491
@ -805,6 +805,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||||||
except zipfile.BadZipFile:
|
except zipfile.BadZipFile:
|
||||||
Logger.logException("w", "Unable to retrieve metadata from {fname}: 3MF archive is corrupt.".format(fname = file_name))
|
Logger.logException("w", "Unable to retrieve metadata from {fname}: 3MF archive is corrupt.".format(fname = file_name))
|
||||||
return result
|
return result
|
||||||
|
except EnvironmentError as e:
|
||||||
|
Logger.logException("w", "Unable to retrieve metadata from {fname}: File is inaccessible. Error: {err}".format(fname = file_name, err = str(e)))
|
||||||
|
return result
|
||||||
|
|
||||||
metadata_files = [name for name in archive.namelist() if name.endswith("plugin_metadata.json")]
|
metadata_files = [name for name in archive.namelist() if name.endswith("plugin_metadata.json")]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user