Skip to content

Commit 5808634

Browse files
committed
Check for type differences with is_type for None safety.
1 parent 879ff16 commit 5808634

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sc2reader/events/tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def load_context(self, replay):
411411
if self.unit_id in replay.objects:
412412
# This can happen because game events are done first
413413
self.unit = replay.objects[self.unit_id]
414-
if self.unit._type_class.str_id != self.unit_type_name:
414+
if self.unit.is_type(self.unit_type_name):
415415
print "CONFLICT {} <-_-> {}".format(self.unit._type_class.str_id, self.unit_type_name)
416416
else:
417417
# TODO: How to tell if something is hallucination?

0 commit comments

Comments
 (0)