From 30ad6e1445b0a4c68046e2df567c86758d05a87e Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 12 Jun 2020 18:39:18 +0200 Subject: [PATCH] On crash report unbundled plugins + version numbers. 3T-sessions have their own internal tickets now! See CURA-7509 for this one. --- cura/CrashHandler.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index a2c9ede8ef..4c0dd4855b 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -215,6 +215,16 @@ class CrashHandler: locale.getdefaultlocale()[0] self.data["locale_cura"] = self.cura_locale + try: + from cura.CuraApplication import CuraApplication + plugins = CuraApplication.getInstance().getPluginRegistry() + self.data["plugins"] = { + plugin_id: plugins.getMetaData(plugin_id)["plugin"]["version"] + for plugin_id in plugins.getInstalledPlugins() if not plugins.isBundledPlugin(plugin_id) + } + except: + self.data["plugins"] = {"[FAILED]": "0.0.0"} + crash_info = "" + catalog.i18nc("@label Cura version number", "Cura version") + ": " + str(self.cura_version) + "
" crash_info += "" + catalog.i18nc("@label", "Cura language") + ": " + str(self.cura_locale) + "
" crash_info += "" + catalog.i18nc("@label", "OS language") + ": " + str(self.data["locale_os"]) + "
" @@ -238,6 +248,8 @@ class CrashHandler: scope.set_tag("locale_cura", self.cura_locale) scope.set_tag("is_enterprise", ApplicationMetadata.IsEnterpriseVersion) + scope.set_context("plugins", self.data["plugins"]) + scope.set_user({"id": str(uuid.getnode())}) return group