From 5a11efa0e37aa76be33e27d7a11ab0217d45de50 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 30 Aug 2017 15:31:03 +1000 Subject: [PATCH] merge new keys from config.json into user conf --- aqt/addons.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/aqt/addons.py b/aqt/addons.py index 324e76fd5..35dbd2be1 100644 --- a/aqt/addons.py +++ b/aqt/addons.py @@ -208,10 +208,15 @@ When loading '%(name)s': def getConfig(self, module): addon = module.split(".")[0] + # get default config + config = self.addonConfigDefaults(addon) + if config is None: + return None + # merge in user's keys meta = self.addonMeta(addon) - if meta.get("config"): - return meta["config"] - return self.addonConfigDefaults(addon) + userConf = meta.get("config", {}) + config.update(userConf) + return config def configAction(self, addon): return self._configButtonActions.get(addon)