summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-07 15:45:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-07 15:45:17 +0200
commit921627014e243fb2dd9b4f9a9dfade26d1e11c12 (patch)
tree2fde2ac7ab11bbca41f2e065095232f46257ab0b /module/Api.py
parentfixes, closed #361 (diff)
downloadpyload-921627014e243fb2dd9b4f9a9dfade26d1e11c12.tar.xz
closed #375
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/Api.py b/module/Api.py
index 18aaf7460..1a69a0a27 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -59,7 +59,7 @@ class Api(Iface):
item = ConfigItem()
item.name = key
item.description = data["desc"]
- item.value = str(data["value"]) if type(data["value"]) != basestring else data["value"]
+ item.value = str(data["value"]) if not isinstance(data["value"], basestring) else data["value"]
item.type = data["type"]
items.append(item)
section.items = items
@@ -81,7 +81,7 @@ class Api(Iface):
else:
value = self.core.config.getPlugin(category, option)
- return str(value) if type(value) != basestring else value
+ return str(value) if not isinstance(value, basestring) else value
def setConfigValue(self, category, option, value, section="core"):
"""Set new config value.