diff --git a/src/Mod/AddonManager/AddonManager.py b/src/Mod/AddonManager/AddonManager.py index 71a685a54e..ae8b6e887b 100644 --- a/src/Mod/AddonManager/AddonManager.py +++ b/src/Mod/AddonManager/AddonManager.py @@ -489,7 +489,8 @@ class CommandAddonManager: def cache_macro(self, macro: AddonManagerRepo): if not hasattr(self, "macro_cache"): self.macro_cache = [] - self.macro_cache.append(macro.macro.to_cache()) + if macro.macro is not None: + self.macro_cache.append(macro.macro.to_cache()) def write_macro_cache(self): macro_cache_path = self.get_cache_file_name("macro_cache.json") diff --git a/src/Mod/AddonManager/package_details.py b/src/Mod/AddonManager/package_details.py index bfbfbc936e..2e06781a3a 100644 --- a/src/Mod/AddonManager/package_details.py +++ b/src/Mod/AddonManager/package_details.py @@ -206,9 +206,13 @@ class PackageDetails(QWidget): self.ui.buttonUpdate.hide() self.ui.buttonCheckForUpdate.hide() - warningColorString = "rgb(200,0,0)" - if "dark" in QApplication.instance().styleSheet().lower(): - warningColorString = "rgb(255,50,50)" + warningColorString = "rgb(255,0,0)" + if hasattr(QApplication.instance(),"styleSheet"): + # Qt 5.9 doesn't give a QApplication instance, so can't give the stylesheet info + if "dark" in QApplication.instance().styleSheet().lower(): + warningColorString = "rgb(255,50,50)" + else: + warningColorString = "rgb(200,0,0)" if repo.obsolete: self.ui.labelWarningInfo.show()