From 6d50437b1ff31cdb1ae2622f198c1a48d51bdfc0 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Fri, 22 Nov 2013 12:44:43 +0100 Subject: fixed and improved last pull request --- pyload/PluginManager.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pyload/PluginManager.py') diff --git a/pyload/PluginManager.py b/pyload/PluginManager.py index 297c67823..b6e4ed977 100644 --- a/pyload/PluginManager.py +++ b/pyload/PluginManager.py @@ -66,7 +66,7 @@ class PluginManager: def addMatcher(self, matcher, index=0): """ Inserts matcher at given index, first position by default """ if not isinstance(matcher, PluginMatcher): - raise TypeError("Expected type of PluginMatcher, got %s instead" % type(matcher)) + raise TypeError("Expected type of PluginMatcher, got '%s' instead" % type(matcher)) if matcher in self.matcher: self.matcher.remove(matcher) @@ -103,8 +103,7 @@ class PluginManager: self.history.insert(0, found) continue - - # matcher won't go to history + # matcher are tried secondly, they won't go to history for m in self.matcher: match = m.matchURL(url) if match and match[0] in res: @@ -122,7 +121,7 @@ class PluginManager: if plugin.re.match(url): res[ptype].append((url, name)) self.history.insert(0, (ptype, name)) - del self.history[self.MATCH_HISTORY:] # cut down to size of 10 + del self.history[self.MATCH_HISTORY:] # cut down to size found = True break if found: break -- cgit v1.2.3