diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-19 00:05:58 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-19 00:05:58 +0200 |
commit | dad722ac7255640e7e0541c4094a4d2e4de79cd3 (patch) | |
tree | 893a08e83fb9b465cd0ecf0b0315a5e820b06b06 /module/plugins/internal | |
parent | [Hoster] Fix the http request issue (diff) | |
download | pyload-dad722ac7255640e7e0541c4094a4d2e4de79cd3.tar.xz |
Code cosmetics (2)
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/Account.py | 20 | ||||
-rw-r--r-- | module/plugins/internal/AdYouLike.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/AdsCaptcha.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/Captcha.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/Crypter.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/Hook.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/Hoster.py | 48 | ||||
-rw-r--r-- | module/plugins/internal/MultiHook.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/OCR.py | 12 | ||||
-rw-r--r-- | module/plugins/internal/Plugin.py | 16 | ||||
-rw-r--r-- | module/plugins/internal/SevenZip.py | 10 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/UnRar.py | 28 | ||||
-rw-r--r-- | module/plugins/internal/XFSAccount.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 8 |
15 files changed, 84 insertions, 84 deletions
diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py index 951d279be..534f5607d 100644 --- a/module/plugins/internal/Account.py +++ b/module/plugins/internal/Account.py @@ -28,12 +28,12 @@ class Account(Plugin): self.manager = manager self.accounts = {} - self.infos = {} #: cache for account information + self.infos = {} #: Cache for account information self.lock = threading.RLock() self.timestamps = {} - self.login_timeout = 10 * 60 #: after that time (in minutes) pyload will relogin the account - self.info_threshold = 10 * 60 #: after that time (in minutes) account data will be reloaded + self.login_timeout = 10 * 60 #: After that time (in minutes) pyload will relogin the account + self.info_threshold = 10 * 60 #: After that time (in minutes) account data will be reloaded self.init() @@ -57,7 +57,7 @@ class Account(Plugin): @lock def _login(self, user, data): - #: set timestamp for login + #: Set timestamp for login self.timestamps[user] = time.time() self.req = self.get_account_request(user) @@ -96,7 +96,7 @@ class Account(Plugin): req.close() if user in self.infos: - del self.infos[user] #: delete old information + del self.infos[user] #: Delete old information return self._login(user, self.accounts[user]) @@ -113,7 +113,7 @@ class Account(Plugin): Updates account and return true if anything changed """ if user in self.accounts: - self.accounts[user]['valid'] = True #: do not remove or accounts will not login + self.accounts[user]['valid'] = True #: Do not remove or accounts will not login if password: self.accounts[user]['password'] = password self.relogin(user) @@ -210,13 +210,13 @@ class Account(Plugin): """ return {"validuntil" : None, #: -1 for unlimited "login" : name, - #: "password" : self.accounts[name]['password'], #: commented due security reason + # "password" : self.accounts[name]['password'], #: Commented due security reason "options" : self.accounts[name]['options'], "valid" : self.accounts[name]['valid'], - "trafficleft": None, #: in bytes, -1 for unlimited + "trafficleft": None, #: In bytes, -1 for unlimited "maxtraffic" : None, "premium" : None, - "timestamp" : 0, #: time this info was retrieved + "timestamp" : 0, #: Time this info was retrieved "type" : self.__name__} @@ -289,7 +289,7 @@ class Account(Plugin): return self.select_account() != (None, None) - def parse_traffic(self, value, unit=None): #: return kilobytes + def parse_traffic(self, value, unit=None): #: Return kilobytes if not unit and not isinstance(value, basestring): unit = "KB" return parse_size(value, unit) diff --git a/module/plugins/internal/AdYouLike.py b/module/plugins/internal/AdYouLike.py index 9036b4632..64ce6e7fa 100644 --- a/module/plugins/internal/AdYouLike.py +++ b/module/plugins/internal/AdYouLike.py @@ -28,7 +28,7 @@ class AdYouLike(Captcha): if m and n: self.key = (m.group(1).strip(), n.group(1).strip()) self.log_debug("Ayl: %s | Callback: %s" % self.key) - return self.key #: key is the tuple(ayl, callback) + return self.key #: Key is the tuple(ayl, callback) else: self.log_warning(_("Ayl or callback pattern not found")) return None diff --git a/module/plugins/internal/AdsCaptcha.py b/module/plugins/internal/AdsCaptcha.py index 788b5e71a..5f4dbaa86 100644 --- a/module/plugins/internal/AdsCaptcha.py +++ b/module/plugins/internal/AdsCaptcha.py @@ -26,7 +26,7 @@ class AdsCaptcha(Captcha): m = re.search(self.PUBLICKEY_PATTERN, html) n = re.search(self.CAPTCHAID_PATTERN, html) if m and n: - self.key = (m.group(1).strip(), n.group(1).strip()) #: key is the tuple(PublicKey, CaptchaId) + self.key = (m.group(1).strip(), n.group(1).strip()) #: Key is the tuple(PublicKey, CaptchaId) self.log_debug("Key: %s | ID: %s" % self.key) return self.key else: diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py index 50ebea89c..68d5d3bb8 100644 --- a/module/plugins/internal/Captcha.py +++ b/module/plugins/internal/Captcha.py @@ -17,7 +17,7 @@ class Captcha(Plugin): super(Captcha, self).__init__(plugin.core) self.plugin = plugin - self.key = None #: last key detected + self.key = None #: Last key detected #@TODO: Recheck in 0.4.10 diff --git a/module/plugins/internal/Crypter.py b/module/plugins/internal/Crypter.py index f6d3528fd..dbecb0cf8 100644 --- a/module/plugins/internal/Crypter.py +++ b/module/plugins/internal/Crypter.py @@ -20,7 +20,7 @@ class Crypter(Hoster): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - html = None #: last html loaded #@TODO: Move to Hoster + html = None #: Last html loaded #@TODO: Move to Hoster def __init__(self, pyfile): diff --git a/module/plugins/internal/Hook.py b/module/plugins/internal/Hook.py index 7ef8f0189..162c9ecbf 100644 --- a/module/plugins/internal/Hook.py +++ b/module/plugins/internal/Hook.py @@ -43,7 +43,7 @@ class Hook(Plugin): #: `HookManager` self.manager = manager - #: automatically register event listeners for functions, attribute will be deleted dont use it yourself + #: Automatically register event listeners for functions, attribute will be deleted dont use it yourself self.event_map = {} #: Deprecated alternative to event_map @@ -68,7 +68,7 @@ class Hook(Plugin): else: self.manager.addEvent(event, getattr(self, funcs)) - #: delete for various reasons + #: Delete for various reasons self.event_map = None if self.event_list: diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index 637d9f3b5..c0e374a86 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -28,7 +28,7 @@ def parse_fileInfo(klass, url="", html=""): #@TODO: Remove in 0.4.10 def getInfo(urls): - # result = [ .. (name, size, status, url) .. ] + #: result = [ .. (name, size, status, url) .. ] pass @@ -62,14 +62,14 @@ class Hoster(Plugin): def __init__(self, pyfile): super(Hoster, self).__init__(pyfile.m.core) - #: engage wan reconnection + #: Engage wan reconnection self.want_reconnect = False - #: enable simultaneous processing of multiple downloads + #: Enable simultaneous processing of multiple downloads self.multi_dl = True self.limit_dl = 0 - #: chunk limit + #: Chunk limit self.chunk_limit = 1 self.resume_download = False @@ -77,13 +77,13 @@ class Hoster(Plugin): self.wait_until = 0 self.waiting = False - #: captcha reader instance + #: Captcha reader instance self.ocr = None - #: account handler instance, see :py:class:`Account` + #: Account handler instance, see :py:class:`Account` self.account = pyfile.m.core.accountManager.getAccountPlugin(self.__name__) - #: premium status + #: Premium status self.premium = False #: username/login @@ -97,37 +97,37 @@ class Hoster(Plugin): #: Browser instance, see `network.Browser` self.req = self.account.get_account_request(self.user) - self.chunk_limit = -1 #: chunk limit, -1 for unlimited + self.chunk_limit = -1 #: Chunk limit, -1 for unlimited - #: enables resume (will be ignored if server dont accept chunks) + #: Enables resume (will be ignored if server dont accept chunks) self.resume_download = True - #: premium status + #: Premium status self.premium = self.account.is_premium(self.user) else: self.req = pyfile.m.core.requestFactory.getRequest(self.__name__) - #: associated pyfile instance, see `PyFile` + #: Associated pyfile instance, see `PyFile` self.pyfile = pyfile - self.thread = None #: holds thread in future + self.thread = None #: Holds thread in future - #: location where the last call to download was saved + #: Location where the last call to download was saved self.last_download = "" - #: re match of the last call to `checkDownload` + #: Re match of the last call to `checkDownload` self.last_check = None - #: js engine, see `JsEngine` + #: Js engine, see `JsEngine` self.js = self.core.js - #: captcha task + #: Captcha task self.c_task = None - #: some plugins store html code here + #: Some plugins store html code here self.html = None - #: dict of the amount of retries already made + #: Dict of the amount of retries already made self.retries = {} self.init() @@ -392,7 +392,7 @@ class Hoster(Plugin): captchaManager.removeTask(task) - if task.error and has_plugin: #: ignore default error message since the user could use OCR + if task.error and has_plugin: #: Ignore default error message since the user could use OCR self.fail(_("Pil and tesseract not installed and no Client connected for captcha decrypting")) elif task.error: self.fail(task.error) @@ -471,7 +471,7 @@ class Hoster(Plugin): except Exception, e: self.fail(e) - #: convert back to unicode + #: Convert back to unicode location = fs_decode(location) name = safe_filename(self.pyfile.name) @@ -555,8 +555,8 @@ class Hoster(Plugin): with open(lastDownload, "rb") as f: content = f.read(read_size) - #: produces encoding errors, better log to other file in the future? - #: self.log_debug("Content: %s" % content) + #: Produces encoding errors, better log to other file in the future? + # self.log_debug("Content: %s" % content) for name, rule in rules.iteritems(): if isinstance(rule, basestring): if rule in content: @@ -699,9 +699,9 @@ class Hoster(Plugin): for pyfile in self.core.files.cache.values(): if pyfile != self.pyfile and pyfile.name == self.pyfile.name and pyfile.package().folder == pack.folder: - if pyfile.status in (0, 12): #: finished or downloading + if pyfile.status in (0, 12): #: Finished or downloading self.skip(pyfile.pluginname) - elif pyfile.status in (5, 7) and starting: #: a download is waiting/starting and was appenrently started before + elif pyfile.status in (5, 7) and starting: #: A download is waiting/starting and was appenrently started before self.skip(pyfile.pluginname) download_folder = self.core.config.get("general", "download_folder") diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py index 7afe95705..4a43e89c7 100644 --- a/module/plugins/internal/MultiHook.py +++ b/module/plugins/internal/MultiHook.py @@ -207,7 +207,7 @@ class MultiHook(Hook): self.log_error(_("No %s loaded") % self.plugintype) return - #: inject plugin plugin + #: Inject plugin plugin self.log_debug("Overwritten %ss: %s" % (self.plugintype, ", ".join(sorted(self.supported)))) for plugin in self.supported: @@ -223,7 +223,7 @@ class MultiHook(Hook): self.log_debug("New %ss: %s" % (self.plugintype, ", ".join(plugins))) - #: create new regexp + #: Create new regexp regexp = r'.*(?P<DOMAIN>%s).*' % "|".join(x.replace('.', '\.') for x in plugins) if hasattr(self.pluginclass, "__pattern__") and isinstance(self.pluginclass.__pattern__, basestring) and "://" in self.pluginclass.__pattern__: regexp = r'%s|%s' % (self.pluginclass.__pattern__, regexp) @@ -252,7 +252,7 @@ class MultiHook(Hook): for plugin in self.supported: self.unload_plugin(plugin) - #: reset pattern + #: Reset pattern hdict = self.core.pluginManager.plugins[self.plugintype][self.pluginname] hdict['pattern'] = getattr(self.pluginclass, "__pattern__", r'^unmatchable$') diff --git a/module/plugins/internal/OCR.py b/module/plugins/internal/OCR.py index 880f8b570..9ddca0315 100644 --- a/module/plugins/internal/OCR.py +++ b/module/plugins/internal/OCR.py @@ -61,12 +61,12 @@ class OCR(Plugin): def run_tesser(self, subset=False, digits=True, lowercase=True, uppercase=True, pagesegmode=None): - #: tmpTif = tempfile.NamedTemporaryFile(suffix=".tif") + # tmpTif = tempfile.NamedTemporaryFile(suffix=".tif") try: tmpTif = open(fs_join("tmp", "tmpTif_%s.tif" % self.__name__), "wb") tmpTif.close() - #: tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") + # tmpTxt = tempfile.NamedTemporaryFile(suffix=".txt") tmpTxt = open(fs_join("tmp", "tmpTxt_%s.txt" % self.__name__), "wb") tmpTxt.close() @@ -88,7 +88,7 @@ class OCR(Plugin): tessparams.extend(["-psm", str(pagesegmode)]) if subset and (digits or lowercase or uppercase): - #: tmpSub = tempfile.NamedTemporaryFile(suffix=".subset") + # tmpSub = tempfile.NamedTemporaryFile(suffix=".subset") with open(fs_join("tmp", "tmpSub_%s.subset" % self.__name__), "wb") as tmpSub: tmpSub.write("tessedit_char_whitelist ") @@ -177,12 +177,12 @@ class OCR(Plugin): except Exception: pass - #: not enough neighbors are dark pixels so mark this pixel - #: to be changed to white + #: Not enough neighbors are dark pixels so mark this pixel + #: To be changed to white if count < allowed: pixels[x, y] = 1 - #: second pass: this time set all 1's to 255 (white) + #: Second pass: this time set all 1's to 255 (white) for x in xrange(w): for y in xrange(h): if pixels[x, y] == 1: diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index dc5995e65..51f952b40 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -69,7 +69,7 @@ def parse_html_form(attr_str, html, input_names={}): inputs[name] = value if input_names: - #: check input attributes + #: Check input attributes for key, val in input_names.iteritems(): if key in inputs: if isinstance(val, basestring) and inputs[key] == val: @@ -78,16 +78,16 @@ def parse_html_form(attr_str, html, input_names={}): continue elif hasattr(val, "search") and re.match(val, inputs[key]): continue - break #: attibute value does not match + break #: Attibute value does not match else: - break #: attibute name does not match + break #: Attibute name does not match else: - return action, inputs #: passed attribute check + return action, inputs #: Passed attribute check else: - #: no attribute check + #: No attribute check return action, inputs - return {}, None #: no matching form found + return {}, None #: No matching form found #@TODO: Move to utils in 0.4.10 @@ -303,13 +303,13 @@ class Plugin(object): os.makedirs(os.path.join("tmp", self.__name__)) with open(framefile, "wb") as f: - del frame #: delete the frame or it wont be cleaned + del frame #: Delete the frame or it wont be cleaned f.write(res.encode('utf8')) except IOError, e: self.log_error(e) if just_header: - #: parse header + #: Parse header header = {"code": req.code} for line in res.splitlines(): line = line.strip() diff --git a/module/plugins/internal/SevenZip.py b/module/plugins/internal/SevenZip.py index d067468dd..c76ef43e2 100644 --- a/module/plugins/internal/SevenZip.py +++ b/module/plugins/internal/SevenZip.py @@ -72,7 +72,7 @@ class SevenZip(UnRar): p = self.call_cmd("l", "-slt", fs_encode(self.filename)) out, err = p.communicate() - #: check if output or error macthes the 'wrong password'-Regexp + #: Check if output or error macthes the 'wrong password'-Regexp if self.re_wrongpwd.search(out): raise PasswordError @@ -91,7 +91,7 @@ class SevenZip(UnRar): renice(p.pid, self.renice) - #: communicate and retrieve stderr + #: Communicate and retrieve stderr self._progress(p) err = p.stderr.read().strip() @@ -102,7 +102,7 @@ class SevenZip(UnRar): elif self.re_wrongcrc.search(err): raise CRCError(err) - else: #: raise error if anything is on stderr + else: #: Raise error if anything is on stderr raise ArchiveError(err) if p.returncode > 1: @@ -134,11 +134,11 @@ class SevenZip(UnRar): def call_cmd(self, command, *xargs, **kwargs): args = [] - # overwrite flag + #: Overwrite flag if self.overwrite: args.append("-y") - # set a password + #: Set a password if "password" in kwargs and kwargs['password']: args.append("-p%s" % kwargs['password']) else: diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 93008f16d..08f13f900 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -124,7 +124,7 @@ class SimpleHoster(Hoster): online = True if info['status'] is 2 else False try: - info['pattern'] = re.match(cls.__pattern__, url).groupdict() #: pattern groups will be saved here + info['pattern'] = re.match(cls.__pattern__, url).groupdict() #: Pattern groups will be saved here except Exception: info['pattern'] = {} diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index 50c421e8d..abd94b4df 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -68,7 +68,7 @@ class UnRar(Extractor): cls.__name__ = "RAR" cls.REPAIR = True - except OSError: #: fallback to unrar + except OSError: #: Fallback to unrar p = subprocess.Popen([cls.CMD], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() @@ -105,7 +105,7 @@ class UnRar(Extractor): if self.re_wrongcrc.search(err): raise CRCError(err) - #: output only used to check if passworded files are present + #: Output only used to check if passworded files are present for attr in self.re_filelist.findall(out): if attr[0].startswith("*"): raise PasswordError @@ -114,7 +114,7 @@ class UnRar(Extractor): def repair(self): p = self.call_cmd("rc", fs_encode(self.filename)) - #: communicate and retrieve stderr + #: Communicate and retrieve stderr self._progress(p) err = p.stderr.read().strip() if err or p.returncode: @@ -126,17 +126,17 @@ class UnRar(Extractor): s = "" while True: c = process.stdout.read(1) - #: quit loop on eof + #: Quit loop on eof if not c: break - #: reading a percentage sign -> set progress and restart + #: Reading a percentage sign -> set progress and restart if c == '%': self.notify_progress(int(s)) s = "" - #: not reading a digit -> therefore restart + #: Not reading a digit -> therefore restart elif c not in digits: s = "" - #: add digit to progressstring + #: Add digit to progressstring else: s += c @@ -148,7 +148,7 @@ class UnRar(Extractor): renice(p.pid, self.renice) - #: communicate and retrieve stderr + #: Communicate and retrieve stderr self._progress(p) err = p.stderr.read().strip() @@ -159,7 +159,7 @@ class UnRar(Extractor): elif self.re_wrongcrc.search(err): raise CRCError(err) - else: #: raise error if anything is on stderr + else: #: Raise error if anything is on stderr raise ArchiveError(err) if p.returncode: @@ -171,7 +171,7 @@ class UnRar(Extractor): def get_delete_files(self): dir, name = os.path.split(self.filename) - #: actually extracted file + #: Actually extracted file files = [self.filename] #: eventually Multipart Files @@ -190,7 +190,7 @@ class UnRar(Extractor): if "Cannot open" in err: raise ArchiveError(_("Cannot open file")) - if err.strip(): #: only log error at this point + if err.strip(): #: Only log error at this point self.manager.log_error(err.strip()) result = set() @@ -211,7 +211,7 @@ class UnRar(Extractor): def call_cmd(self, command, *xargs, **kwargs): args = [] - #: overwrite flag + #: Overwrite flag if self.overwrite: args.append("-o+") else: @@ -222,10 +222,10 @@ class UnRar(Extractor): for word in self.excludefiles: args.append("-x'%s'" % word.strip()) - #: assume yes on all queries + #: Assume yes on all queries args.append("-y") - #: set a password + #: Set a password if "password" in kwargs and kwargs['password']: args.append("-p%s" % kwargs['password']) else: diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py index 4005b8e21..7ae6d816e 100644 --- a/module/plugins/internal/XFSAccount.py +++ b/module/plugins/internal/XFSAccount.py @@ -30,10 +30,10 @@ class XFSAccount(Account): VALID_UNTIL_PATTERN = r'Premium.[Aa]ccount expire:.*?(\d{1,2} [\w^_]+ \d{4})' TRAFFIC_LEFT_PATTERN = r'Traffic available today:.*?<b>\s*(?P<S>[\d.,]+|[Uu]nlimited)\s*(?:(?P<U>[\w^_]+)\s*)?</b>' - TRAFFIC_LEFT_UNIT = "MB" #: used only if no group <U> was found + TRAFFIC_LEFT_UNIT = "MB" #: Used only if no group <U> was found LEECH_TRAFFIC_PATTERN = r'Leech Traffic left:<b>.*?(?P<S>[\d.,]+|[Uu]nlimited)\s*(?:(?P<U>[\w^_]+)\s*)?</b>' - LEECH_TRAFFIC_UNIT = "MB" #: used only if no group <U> was found + LEECH_TRAFFIC_UNIT = "MB" #: Used only if no group <U> was found LOGIN_FAIL_PATTERN = r'Incorrect Login or Password|account was banned|Error<' @@ -87,7 +87,7 @@ class XFSAccount(Account): trafficleft = -1 else: premium = False - validuntil = None #: registered account type (not premium) + validuntil = None #: Registered account type (not premium) else: self.log_debug("VALID_UNTIL_PATTERN not found") diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 9f8728512..d4810f8b7 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -47,7 +47,7 @@ class XFSHoster(SimpleHoster): SOLVEMEDIA_PATTERN = None FORM_PATTERN = None - FORM_INPUTS_MAP = None #: dict passed as input_names to parse_html_form + FORM_INPUTS_MAP = None #: Dict passed as input_names to parse_html_form def setup(self): @@ -123,7 +123,7 @@ class XFSHoster(SimpleHoster): if not self.account: self.fail(_("Only registered or premium users can use url leech feature")) - # only tested with easybytez.com + #: Only tested with easybytez.com self.html = self.load("http://www.%s/" % self.HOSTER_DOMAIN) action, inputs = self.parse_html_form() @@ -137,7 +137,7 @@ class XFSHoster(SimpleHoster): self.log_debug(action, inputs) - self.req.setOption("timeout", 600) #: wait for file to upload to easybytez.com + self.req.setOption("timeout", 600) #: Wait for file to upload to easybytez.com self.html = self.load(action, post=inputs) @@ -163,7 +163,7 @@ class XFSHoster(SimpleHoster): else: self.fail(stmsg) - # get easybytez.com link for uploaded file + #: Get easybytez.com link for uploaded file m = re.search(self.LINK_LEECH_PATTERN, self.html) if m is None: self.error(_("LINK_LEECH_PATTERN not found")) |