From 21a0b9663af74c06b2a41a27b06c6fa3881f8a9b Mon Sep 17 00:00:00 2001
From: Walter Purcaro <vuolter@users.noreply.github.com>
Date: Sun, 18 Oct 2015 18:52:10 +0200
Subject: Update accounts

---
 module/plugins/accounts/RapidgatorNet.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

(limited to 'module/plugins/accounts/RapidgatorNet.py')

diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py
index 9c37f6212..851ce5b09 100644
--- a/module/plugins/accounts/RapidgatorNet.py
+++ b/module/plugins/accounts/RapidgatorNet.py
@@ -3,7 +3,7 @@
 import urlparse
 
 from module.plugins.internal.Account import Account
-from module.common.json_layer import json_loads
+from module.plugins.internal.utils import jso
 
 
 class RapidgatorNet(Account):
@@ -34,17 +34,17 @@ class RapidgatorNet(Account):
 
             self.log_debug("API:USERINFO", html)
 
-            json = json_loads(html)
+            jso = json.loads(html)
 
-            if json['response_status'] == 200:
-                if "reset_in" in json['response']:
-                    self._schedule_refresh(user, json['response']['reset_in'])
+            if jso['response_status'] == 200:
+                if "reset_in" in jso['response']:
+                    self._schedule_refresh(user, jso['response']['reset_in'])
 
-                validuntil  = json['response']['expire_date']
-                trafficleft = float(json['response']['traffic_left']) / 1024  #@TODO: Remove `/ 1024` in 0.4.10
+                validuntil  = jso['response']['expire_date']
+                trafficleft = float(jso['response']['traffic_left']) / 1024  #@TODO: Remove `/ 1024` in 0.4.10
                 premium     = True
             else:
-                self.log_error(json['response_details'])
+                self.log_error(jso['response_details'])
 
         except Exception, e:
             self.log_error(e, trace=True)
@@ -63,13 +63,13 @@ class RapidgatorNet(Account):
 
             self.log_debug("API:LOGIN", html)
 
-            json = json_loads(html)
+            jso = json.loads(html)
 
-            if json['response_status'] == 200:
-                data['sid'] = str(json['response']['session_id'])
+            if jso['response_status'] == 200:
+                data['sid'] = str(jso['response']['session_id'])
                 return
             else:
-                self.log_error(json['response_details'])
+                self.log_error(jso['response_details'])
 
         except Exception, e:
             self.log_error(e, trace=True)
-- 
cgit v1.2.3