diff options
author | Florian Franzen <FlorianFranzen@gmail.com> | 2012-04-09 23:33:31 +0200 |
---|---|---|
committer | Florian Franzen <FlorianFranzen@gmail.com> | 2012-04-09 23:33:31 +0200 |
commit | c9259e2bd0a2dbae2292b1bad483eddf3e3ca94b (patch) | |
tree | c343d1c71de296e8160fd3a74d4a7217db4668a8 /module/plugins | |
parent | Added premiumize.me support, using their new API (https://secure.premiumize.m... (diff) | |
download | pyload-c9259e2bd0a2dbae2292b1bad483eddf3e3ca94b.tar.xz |
Fixes a bug where unset or empty __pattern__ in MultiHoster plugins produce an error or an all matching regex if the MultiHoster introduces a new hosters to pyLoad.
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index d50df3943..5e9a03fee 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -73,7 +73,10 @@ class MultiHoster(Hook): self.logDebug("New Hosters: %s" % ", ".join(sorted(new_supported))) # create new regexp - regexp = r".*(%s).*" % "|".join([klass.__pattern__] + [x.replace(".", "\\.") for x in new_supported]) + if not klass.__pattern__ or klass.pattern == "": + regexp = r".*(%s).*" % "|".join([x.replace(".", "\\.") for x in new_supported]) + else: + regexp = r".*(%s).*" % "|".join([klass.__pattern__] + [x.replace(".", "\\.") for x in new_supported]) dict = self.core.pluginManager.hosterPlugins[self.__name__] dict["pattern"] = regexp |