3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-16 01:45:30 +00:00

Fix comparing int with None

This commit is contained in:
Krystine Sherwin 2025-07-29 10:33:59 +12:00
parent 9cb368b9c8
commit 5992167909
No known key found for this signature in database

View file

@ -476,7 +476,10 @@ class SbyStatusDb:
# no depth or kind to compare, just take latest data
update_map = True
elif this_depth is not None and this_depth != current_depth:
if status == 'FAIL' and this_depth < current_depth:
if current_depth is None:
# always prefer a known depth to an unknown
update_map = True
elif status == 'FAIL' and this_depth < current_depth:
# earliest fail
update_map = True
elif status != 'FAIL' and this_depth > current_depth: