summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/RPNetBiz.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-10 00:19:51 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-10 00:19:51 +0100
commitc9e31d875d32de31e54959b82bc35eff2b3e0f3f (patch)
tree5022eadf2ac5c65ba075f172af873b737310ed66 /module/plugins/accounts/RPNetBiz.py
parent[Keep2shareCc] Fix account __name__ (diff)
downloadpyload-c9e31d875d32de31e54959b82bc35eff2b3e0f3f.tar.xz
Code cosmetics
Diffstat (limited to 'module/plugins/accounts/RPNetBiz.py')
-rw-r--r--module/plugins/accounts/RPNetBiz.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py
index 35ad58d2d..4daa56a75 100644
--- a/module/plugins/accounts/RPNetBiz.py
+++ b/module/plugins/accounts/RPNetBiz.py
@@ -16,11 +16,11 @@ class RPNetBiz(Account):
def loadAccountInfo(self, user, req):
# Get account information from rpnet.biz
- response = self.getAccountStatus(user, req)
+ res = self.getAccountStatus(user, req)
try:
- if response['accountInfo']['isPremium']:
+ if res['accountInfo']['isPremium']:
# Parse account info. Change the trafficleft later to support per host info.
- account_info = {"validuntil": int(response['accountInfo']['premiumExpiry']),
+ account_info = {"validuntil": int(res['accountInfo']['premiumExpiry']),
"trafficleft": -1, "premium": True}
else:
account_info = {"validuntil": None, "trafficleft": None, "premium": False}
@@ -34,18 +34,18 @@ class RPNetBiz(Account):
def login(self, user, data, req):
# Get account information from rpnet.biz
- response = self.getAccountStatus(user, req)
+ res = self.getAccountStatus(user, req)
- # If we have an error in the response, we have wrong login information
- if 'error' in response:
+ # If we have an error in the res, we have wrong login information
+ if 'error' in res:
self.wrongPassword()
def getAccountStatus(self, user, req):
# Using the rpnet API, check if valid premium account
- response = req.load("https://premium.rpnet.biz/client_api.php",
+ res = req.load("https://premium.rpnet.biz/client_api.php",
get={"username": user, "password": self.accounts[user]['password'],
"action": "showAccountInformation"})
- self.logDebug("JSON data: %s" % response)
+ self.logDebug("JSON data: %s" % res)
- return json_loads(response)
+ return json_loads(res)