From d4b3941f2a494eb42a7d80ef825a57ad083ce29e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Dec 2014 14:57:35 +0100 Subject: [UnrestrictLi] Fix secondsToMidnight on python 2.5 & 2.6 (2) --- module/plugins/hoster/UnrestrictLi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 615409dab..d5c3ddc15 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -16,10 +16,10 @@ def secondsToMidnight(gmt=0): else: midnight = now + timedelta(days=1) - dt = midnight.replace(hour=0, minute=10, second=0, microsecond=0) - now + td = midnight.replace(hour=0, minute=10, second=0, microsecond=0) - now - if hasattr(dt, 'total_seconds'): - res = dt.total_seconds() + if hasattr(td, 'total_seconds'): + res = td.total_seconds() else: res = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6 @@ -29,7 +29,7 @@ def secondsToMidnight(gmt=0): class UnrestrictLi(Hoster): __name__ = "UnrestrictLi" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'https?://(?:[^/]*\.)?(unrestrict|unr)\.li' -- cgit v1.2.3