From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/internal/SimpleHoster.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index e9ba59c0d..ba143f4d8 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -53,7 +53,7 @@ def parseHtmlForm(attr_str, html, input_names=None): name = parseHtmlTagAttrValue("name", inputtag.group(1)) if name: value = parseHtmlTagAttrValue("value", inputtag.group(1)) - if value is None: + if not value: inputs[name] = inputtag.group(3) or '' else: inputs[name] = value @@ -135,6 +135,7 @@ def parseFileInfo(self, url='', html=''): def create_getInfo(plugin): + def getInfo(urls): for url in urls: cj = CookieJar(plugin.__name__) @@ -152,6 +153,7 @@ def timestamp(): class PluginParseError(Exception): + def __init__(self, msg): Exception.__init__(self) self.value = 'Parse error (%s) - plugin may be out of date' % msg -- cgit v1.2.3