diff options
Diffstat (limited to 'pyload/utils/__init__.py')
-rw-r--r-- | pyload/utils/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py index 1c398224f..004274c3e 100644 --- a/pyload/utils/__init__.py +++ b/pyload/utils/__init__.py @@ -232,6 +232,11 @@ def fixup(m): return text # leave as is +def has_method(obj, name): + """ Check if "name" was defined in obj, (false if it was inhereted) """ + return hasattr(obj, '__dict__') and name in obj.__dict__ + + def html_unescape(text): """Removes HTML or XML character references and entities from a text string""" return re.sub("&#?\w+;", fixup, text) |