From 1b2591b0650a6a0be1ad41022f6019d17192f195 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 11 Dec 2014 01:04:07 +0100 Subject: Rename some Addon methods --- pyload/utils/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pyload/utils') 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) -- cgit v1.2.3