summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:14:50 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:14:50 +0100
commite1baccf1ec914563d3b2b845906cce024e7cd3b1 (patch)
tree7113e8923ea58112787ce93d5ab9d98e277926c9 /module/plugins/accounts
parent[SimpleCrypter] Better account retrieving (diff)
downloadpyload-e1baccf1ec914563d3b2b845906cce024e7cd3b1.tar.xz
Replace 'except' with 'except Exception'
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/AlldebridCom.py2
-rw-r--r--module/plugins/accounts/CatShareNet.py4
-rw-r--r--module/plugins/accounts/NoPremiumPl.py4
-rw-r--r--module/plugins/accounts/RapideoPl.py4
-rw-r--r--module/plugins/accounts/RehostTo.py8
5 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index 1f2371e28..c830f0c09 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -37,7 +37,7 @@ class AlldebridCom(Account):
exp_data[1]) * 60 * 60 + (int(exp_data[2]) - 1) * 60
#Get expiration date from API
- except:
+ except Exception:
data = self.getAccountData(user)
html = req.load("http://www.alldebrid.com/api.php",
get={'action': "info_user", 'login': user, 'pw': data['password']})
diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py
index bcb14bee3..90cdfe013 100644
--- a/module/plugins/accounts/CatShareNet.py
+++ b/module/plugins/accounts/CatShareNet.py
@@ -31,7 +31,7 @@ class CatShareNet(Account):
m = re.search(self.PREMIUM_PATTERN, html)
if "Premium" in m.group(1):
premium = True
- except:
+ except Exception:
pass
try:
@@ -39,7 +39,7 @@ class CatShareNet(Account):
expiredate = m.group(1)
if "-" not in expiredate:
validuntil = mktime(strptime(expiredate, "%d.%m.%Y"))
- except:
+ except Exception:
pass
return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil}
diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py
index f2223b7d9..a36b114eb 100644
--- a/module/plugins/accounts/NoPremiumPl.py
+++ b/module/plugins/accounts/NoPremiumPl.py
@@ -35,7 +35,7 @@ class NoPremiumPl(Account):
self._req = req
try:
result = loads(self.runAuthQuery())
- except:
+ except Exception:
# todo: return or let it be thrown?
return
@@ -60,7 +60,7 @@ class NoPremiumPl(Account):
try:
response = loads(self.runAuthQuery())
- except:
+ except Exception:
self.wrongPassword()
if "errno" in response.keys():
diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py
index 438ce7ad3..426c680a6 100644
--- a/module/plugins/accounts/RapideoPl.py
+++ b/module/plugins/accounts/RapideoPl.py
@@ -35,7 +35,7 @@ class RapideoPl(Account):
self._req = req
try:
result = loads(self.runAuthQuery())
- except:
+ except Exception:
# todo: return or let it be thrown?
return
@@ -59,7 +59,7 @@ class RapideoPl(Account):
self._req = req
try:
response = loads(self.runAuthQuery())
- except:
+ except Exception:
self.wrongPassword()
if "errno" in response.keys():
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 897f888b0..04e71c9ad 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -18,13 +18,13 @@ class RehostTo(Account):
trafficleft = None
validuntil = -1
session = ""
-
+
html = req.load("http://rehost.to/api.php",
get={'cmd' : "login", 'user': user,
'pass': self.getAccountData(user)['password']})
try:
session = html.split(",")[1].split("=")[1]
-
+
html = req.load("http://rehost.to/api.php",
get={'cmd': "get_premium_credits", 'long_ses': session})
@@ -32,11 +32,11 @@ class RehostTo(Account):
self.logDebug(html)
else:
traffic, valid = html.split(",")
-
+
premium = True
trafficleft = self.parseTraffic(traffic + "MB")
validuntil = float(valid)
-
+
finally:
return {'premium' : premium,
'trafficleft': trafficleft,