diff options
author | Ghostkeeper <rubend@tutanota.com> | 2021-09-22 15:59:27 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2021-09-22 15:59:27 +0300 |
commit | 426e3064d2e913f70be9ada112201b89c1ba0aeb (patch) | |
tree | 74349c716369304f70f0e799c2f41bc084281f6c /plugins/UM3NetworkPrinting/src | |
parent | 0626eccb92def48dde8e05dbb5e7ad10cddba002 (diff) |
Don't crash when material file can't be opened for sending to printer
It seems that due to the threaded nature, the limit to the number of open file handlers could be reached here. Or it could just be locked or something of course.
Fixes Sentry issue CURA-2V2.
Diffstat (limited to 'plugins/UM3NetworkPrinting/src')
-rw-r--r-- | plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py index 96a2b78e8f..877eaebcb7 100644 --- a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py +++ b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py @@ -133,6 +133,9 @@ class SendMaterialJob(Job): except FileNotFoundError: Logger.error("Unable to send material {material_id}, since it has been deleted in the meanwhile.".format(material_id = material_id)) return + except EnvironmentError as e: + Logger.error(f"Unable to send material {material_id}. We can't open that file for reading: {str(e)}") + return # Add the material signature file if needed. signature_file_path = "{}.sig".format(file_path) |