Fix python3 fail comparing time struct to None

This is no longer a valid comparison in python3 as it is considered
ambiguous. Specifically return True/False when None is encountered.
This commit is contained in:
Clint Byrum
2015-05-24 08:10:09 -07:00
parent caa0eb8a00
commit f1305a3302

View File

@@ -313,4 +313,8 @@ def later_than(after, before):
elif isinstance(before, int):
before = time.gmtime(before)
if before is None:
return True
if after is None:
return False
return after >= before