diff options
author | 2015-04-18 14:08:18 +0200 | |
---|---|---|
committer | 2015-04-18 14:08:18 +0200 | |
commit | 6e8f84e1dc06cff6fa9387559992f555182c1774 (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/utils/__init__.py | |
parent | fix: config cast (diff) | |
parent | Spare code cosmetics (5) (diff) | |
download | pyload-6e8f84e1dc06cff6fa9387559992f555182c1774.tar.xz |
Merge pull request #3 from vuolter/0.4.10
merge vuolter HEAD
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): |