Don't crash when failing to create Toolbox.qml dialogue

Basically we should never be raising the master Exception class, really.
The enclosing class has error handling in case this returns None already, so this fix is easy.

Contributes to Sentry issue CURA-Y5.
This commit is contained in:
Ghostkeeper 2020-06-18 14:53:18 +02:00
parent 85bfb02228
commit f8a88642c2
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
2 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
# Copyright (c) 2019 Ultimaker B.V.
# Copyright (c) 2020 Ultimaker B.V.
# Toolbox is released under the terms of the LGPLv3 or higher.
import json
@ -232,7 +232,7 @@ class Toolbox(QObject, Extension):
"licenseModel": self._license_model
})
if not dialog:
raise Exception("Failed to create Marketplace dialog")
return None
return dialog
def _convertPluginMetadata(self, plugin_data: Dict[str, Any]) -> Optional[Dict[str, Any]]: