diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 20:59:01 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 20:59:01 +0200 |
commit | 853d29a0f12cdcb6c406b829a57439c7ea9b570d (patch) | |
tree | 047d94a11037617521c7a50130a6ead538c5daf7 /module/Api.py | |
parent | fixed config on webif + show description (diff) | |
download | pyload-853d29a0f12cdcb6c406b829a57439c7ea9b570d.tar.xz |
has_key refractored, package name generator by Geek
Diffstat (limited to 'module/Api.py')
-rw-r--r-- | module/Api.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/module/Api.py b/module/Api.py index ffb88c6af..fd65dff92 100644 --- a/module/Api.py +++ b/module/Api.py @@ -64,7 +64,7 @@ class Api(Iface): items.append(item) section.items = items sections[sectionName] = section - if sub.has_key("outline"): + if "outline" in sub: section.outline = sub["outline"] return sections @@ -90,7 +90,6 @@ class Api(Iface): :param section: 'plugin' or 'core """ self.core.hookManager.dispatchEvent("configChanged", category, option, value, section) - print category, option, value, section if section == "core": self.core.config[category][option] = value @@ -727,7 +726,7 @@ class Api(Iface): :return: bool """ cont = self.core.hookManager.methods - return cont.has_key(plugin) and cont[plugin].has_key(func) + return plugin in cont and func in cont[plugin] def call(self, info): """Calls a service (a method in hook plugin). @@ -765,7 +764,7 @@ class Api(Iface): :return: dict of attr names mapped to value {"name": value} """ info = self.core.hookManager.getAllInfo() - if info.has_key(plugin): + if plugin in info: return info[plugin] else: return {} |