diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-11 01:04:07 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-11 01:04:07 +0100 |
commit | 1b2591b0650a6a0be1ad41022f6019d17192f195 (patch) | |
tree | dbd2158b96141ef9354b5cd5edaead28978d65e7 /pyload/utils/__init__.py | |
parent | Support new key attributes (diff) | |
download | pyload-1b2591b0650a6a0be1ad41022f6019d17192f195.tar.xz |
Rename some Addon methods
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) |