summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/internal/misc.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/module/plugins/internal/misc.py b/module/plugins/internal/misc.py
index b8a9cf143..606c0c528 100644
--- a/module/plugins/internal/misc.py
+++ b/module/plugins/internal/misc.py
@@ -38,7 +38,7 @@ except ImportError:
class misc(object):
__name__ = "misc"
__type__ = "plugin"
- __version__ = "0.33"
+ __version__ = "0.34"
__status__ = "stable"
__pattern__ = r'^unmatchable$'
@@ -91,8 +91,7 @@ class DB(object):
"""
Saves a value persistently to the database
"""
- value = map(decode, value) if isiterable(value) else decode(value)
- entry = json.dumps(value).encode('base64')
+ entry = json.dumps(value, ensure_ascii=False).encode('base64')
self.plugin.pyload.db.setStorage(self.plugin.classname, key, entry)
@@ -335,9 +334,9 @@ def uniqify(seq):
def has_method(obj, name):
"""
- Check if name was defined in obj (return false if inhereted)
+ Check if function 'name' was defined in obj
"""
- return hasattr(obj, '__dict__') and name in obj.__dict__
+ return callable(getattr(obj, name, None))
def html_unescape(text):