summaryrefslogtreecommitdiffstats
path: root/module/utils/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/utils/__init__.py')
-rw-r--r--module/utils/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/utils/__init__.py b/module/utils/__init__.py
index 0d68448cb..a237fde9b 100644
--- a/module/utils/__init__.py
+++ b/module/utils/__init__.py
@@ -157,6 +157,10 @@ def fixup(m):
return text # leave as is
+def has_method(obj, name):
+ """ checks if 'name' was defined in obj, (false if it was inhereted) """
+ return 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)