summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/ShareonlineBiz.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/ShareonlineBiz.py')
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index 8b32ab54d..27371864e 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -45,8 +45,11 @@ class ShareonlineBiz(Account):
validuntil = float(api['expire_date'])
traffic = float(api['traffic_1d'].split(";")[0])
- maxtraffic = max(maxtraffic, traffic)
- trafficleft = maxtraffic - traffic
+
+ if maxtraffic > traffic:
+ trafficleft = maxtraffic - traffic
+ else:
+ trafficleft = -1
maxtraffic /= 1024 #@TODO: Remove `/ 1024` in 0.4.10
trafficleft /= 1024 #@TODO: Remove `/ 1024` in 0.4.10