Using == not is

This commit is contained in:
Nick Mowen 2022-03-07 11:27:43 -07:00
parent 32f4dbec30
commit f51ea9d015

View File

@ -580,7 +580,7 @@ class CameraState:
] ]
for obj_name in expired_objects: for obj_name in expired_objects:
# Ignore the artificial all label # Ignore the artificial all label
if obj_name is "all": if obj_name == "all":
continue continue
self.object_counts[obj_name] = 0 self.object_counts[obj_name] = 0
@ -909,7 +909,7 @@ class TrackedObjectProcessor(threading.Thread):
# update counts and publish status # update counts and publish status
for label in set(self.zone_data[zone].keys()) | set(obj_counter.keys()): for label in set(self.zone_data[zone].keys()) | set(obj_counter.keys()):
# Ignore the artificial all label # Ignore the artificial all label
if label is "all": if label == "all":
continue continue
# if we have previously published a count for this zone/label # if we have previously published a count for this zone/label