summaryrefslogtreecommitdiffstats
path: root/pyload/utils/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/utils/__init__.py')
-rw-r--r--pyload/utils/__init__.py14
1 files changed, 9 insertions, 5 deletions
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):