From 275ecd47f14ebee8309de1e1f13d090ca50c38fe Mon Sep 17 00:00:00 2001 From: Nitzo Date: Sun, 10 Jan 2016 02:12:35 +0200 Subject: "is" is evil (2) --- module/plugins/accounts/HellshareCz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index aef8232fd..e514455a6 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class HellshareCz(Account): __name__ = "HellshareCz" __type__ = "account" - __version__ = "0.24" + __version__ = "0.25" __status__ = "testing" __description__ = """Hellshare.cz account plugin""" @@ -36,7 +36,7 @@ class HellshareCz(Account): #: Time-based account vt = [int(x) for x in credit.split('.')[:2]] lt = time.localtime() - year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] is lt.tm_mon and vt[0] < lt.tm_mday)) + year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] == lt.tm_mon and vt[0] < lt.tm_mday)) validuntil = time.mktime(time.strptime("%s%d 23:59:59" % (credit, year), "%d.%m.%Y %H:%M:%S")) trafficleft = -1 else: -- cgit v1.2.3