From e48abf98766b0a9c5799f17073d867dc09b23663 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Apr 2015 17:54:19 +0200 Subject: PEP-8, Python Zen, refactor and reduce code (part 3 in master module) Conflicts: module/InitHomeDir.py module/debug.py module/forwarder.py module/unescape.py pyload/datatype/Package.py pyload/manager/Event.py pyload/manager/Thread.py pyload/manager/event/Scheduler.py pyload/utils/__init__.py pyload/webui/filters.py --- pyload/utils/__init__.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'pyload/utils/__init__.py') diff --git a/pyload/utils/__init__.py b/pyload/utils/__init__.py index 648432c26..2e23bf99b 100644 --- a/pyload/utils/__init__.py +++ b/pyload/utils/__init__.py @@ -116,13 +116,17 @@ def compare_time(start, end): start = map(int, start) end = map(int, end) - if start == end: return True + if start == end: + return True now = list(time.localtime()[3:5]) - if start < now < end: return True - elif start > end and (now > start or now < end): return True - elif start < now > end < start: return True - else: return False + if start < now < end: + return True + elif start > end and (now > start or now < end): + return True + elif start < now > end < start: + return True + return False def formatSize(size): -- cgit v1.2.3