diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-13 23:13:00 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-13 23:13:00 +0100 |
commit | 569c5afa7667110d138968e1c8b50f02649136ca (patch) | |
tree | b444bd54a81f00c41f56f902cbf6ef97aec6b8c3 | |
parent | [XFSHoster] Auto-resolve HOSTER_DOMAIN (diff) | |
download | pyload-569c5afa7667110d138968e1c8b50f02649136ca.tar.xz |
[SimpleCrypter] Better account retrieving
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index d33ad77e9..9f8eb2f7e 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -12,7 +12,7 @@ from module.utils import fixup class SimpleCrypter(Crypter, SimpleHoster): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.39" + __version__ = "0.40" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), #: Overrides core.config['general']['folder_per_package'] @@ -71,12 +71,12 @@ class SimpleCrypter(Crypter, SimpleHoster): #@TODO: Remove in 0.4.10 def init(self): account_name = (self.__name__ + ".py").replace("Folder.py", "").replace(".py", "") - account = self.core.accountManager.getAccountPlugin(account_name) + account = self.pyfile.m.core.accountManager.getAccountPlugin(account_name) if account and account.canUse(): self.user, data = account.selectAccount() - self.req = account.getAccountRequest(self.user) - self.premium = account.isPremium(self.user) + self.req = account.getAccountRequest(self.user) + self.premium = account.isPremium(self.user) self.account = account @@ -161,7 +161,7 @@ class SimpleCrypter(Crypter, SimpleHoster): def handlePages(self, pyfile): try: pages = int(re.search(self.PAGES_PATTERN, self.html).group(1)) - except: + except Exception: pages = 1 for p in xrange(2, pages + 1): |