diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 17:54:19 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 17:54:19 +0200 |
commit | e48abf98766b0a9c5799f17073d867dc09b23663 (patch) | |
tree | 08e907597b172e5879c59eea4421b58a4b73fd46 /pyload/utils/__init__.py | |
parent | Spare code cosmetics (4) (diff) | |
download | pyload-e48abf98766b0a9c5799f17073d867dc09b23663.tar.xz |
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
Diffstat (limited to 'pyload/utils/__init__.py')
-rw-r--r-- | pyload/utils/__init__.py | 14 |
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): |