Python 2/3 compatible treatment of max(n, None)
Python 3 does no longer allow comparisons of different types. Therefore, explicitly convert f.checked_runid to a number that's always smaller than `f.changed_runid`
This commit is contained in:
parent
52a8ca25b2
commit
efab08fc9f
2 changed files with 3 additions and 2 deletions
|
|
@ -278,7 +278,8 @@ class File(object):
|
|||
(self.id, self.name, self.is_generated, self.is_override,
|
||||
self.checked_runid, self.changed_runid, self.failed_runid,
|
||||
self.stamp, self.csum) = cols
|
||||
if self.name == ALWAYS and self.changed_runid < env.v.RUNID:
|
||||
if self.name == ALWAYS and (
|
||||
self.changed_runid is None or self.changed_runid < env.v.RUNID):
|
||||
self.changed_runid = env.v.RUNID
|
||||
|
||||
def __init__(self, fid=None, name=None, cols=None, allow_add=True):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue