summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-21 14:36:22 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-21 14:36:22 +0200
commitf9fc367427e30b7a3ca2ccad6144cb76b21f0257 (patch)
treed35656dd6253edcfdd4d19efe1756c0fddacaf27 /module/plugins/accounts
parentFix pyfile.name processing (diff)
downloadpyload-f9fc367427e30b7a3ca2ccad6144cb76b21f0257.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/HellshareCz.py1
-rw-r--r--module/plugins/accounts/MegasharesCom.py1
-rw-r--r--module/plugins/accounts/NitroflareCom.py1
-rw-r--r--module/plugins/accounts/NoPremiumPl.py2
-rw-r--r--module/plugins/accounts/OneFichierCom.py1
-rw-r--r--module/plugins/accounts/RapideoPl.py2
6 files changed, 8 insertions, 0 deletions
diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py
index f48328ae9..404caba7a 100644
--- a/module/plugins/accounts/HellshareCz.py
+++ b/module/plugins/accounts/HellshareCz.py
@@ -44,6 +44,7 @@ class HellshareCz(Account):
#: Traffic-based account
trafficleft = self.parse_traffic(credit + "MB")
validuntil = -1
+
except Exception, e:
self.log_error(_("Unable to parse credit info"), e)
validuntil = -1
diff --git a/module/plugins/accounts/MegasharesCom.py b/module/plugins/accounts/MegasharesCom.py
index bad3f5896..66db57814 100644
--- a/module/plugins/accounts/MegasharesCom.py
+++ b/module/plugins/accounts/MegasharesCom.py
@@ -31,6 +31,7 @@ class MegasharesCom(Account):
timestr = re.search(self.VALID_UNTIL_PATTERN, html).group(1)
self.log_debug(timestr)
validuntil = time.mktime(time.strptime(timestr, "%b %d, %Y"))
+
except Exception, e:
self.log_error(e)
diff --git a/module/plugins/accounts/NitroflareCom.py b/module/plugins/accounts/NitroflareCom.py
index 58646dfdb..e2408c195 100644
--- a/module/plugins/accounts/NitroflareCom.py
+++ b/module/plugins/accounts/NitroflareCom.py
@@ -40,6 +40,7 @@ class NitroflareCom(Account):
try:
validuntil = sum(int(v) * {'day': 24 * 3600, 'hour': 3600, 'minute': 60}[u.lower()] for v, u in
re.findall(r'(\d+)\s*(day|hour|minute)', expiredate, re.I))
+
except Exception, e:
self.log_error(e)
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py
index 79369e105..3d6d6496b 100644
--- a/module/plugins/accounts/NoPremiumPl.py
+++ b/module/plugins/accounts/NoPremiumPl.py
@@ -36,6 +36,7 @@ class NoPremiumPl(Account):
self._req = req
try:
result = json_loads(self.run_auth_query())
+
except Exception:
#@TODO: return or let it be thrown?
return
@@ -61,6 +62,7 @@ class NoPremiumPl(Account):
try:
response = json_loads(self.run_auth_query())
+
except Exception:
self.fail_login()
diff --git a/module/plugins/accounts/OneFichierCom.py b/module/plugins/accounts/OneFichierCom.py
index 795d2335d..59fd87f51 100644
--- a/module/plugins/accounts/OneFichierCom.py
+++ b/module/plugins/accounts/OneFichierCom.py
@@ -36,6 +36,7 @@ class OneFichierCom(Account):
try:
validuntil = time.mktime(time.strptime(expiredate, "%Y-%m-%d"))
+
except Exception, e:
self.log_error(e)
else:
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py
index f7c6a4af3..6a9ca5e01 100644
--- a/module/plugins/accounts/RapideoPl.py
+++ b/module/plugins/accounts/RapideoPl.py
@@ -36,6 +36,7 @@ class RapideoPl(Account):
self._req = req
try:
result = json_loads(self.run_auth_query())
+
except Exception:
#@TODO: return or let it be thrown?
return
@@ -61,6 +62,7 @@ class RapideoPl(Account):
try:
response = json_loads(self.run_auth_query())
+
except Exception:
self.fail_login()