Skip to content

Commit ee0fc50

Browse files
dsjoergGraylinKim
authored andcommitted
fix processing of unit_upkeeper for tracker events
1 parent 7cef03e commit ee0fc50

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sc2reader/events/tracker.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,10 @@ def load_context(self, replay):
360360
print "Unit owner changed before it was born!"
361361

362362
if self.unit_upkeeper:
363-
if unit.owner:
364-
print "stduff"
365-
unit.owner.units.remove(unit)
366-
unit.owner = self.unit_upkeeper
367-
self.unit_upkeeper.units.append(unit)
363+
if self.unit.owner:
364+
self.unit.owner.units.remove(self.unit)
365+
self.unit.owner = self.unit_upkeeper
366+
self.unit_upkeeper.units.append(self.unit)
368367

369368
def __str__(self):
370369
return self._str_prefix()+"{0: >15} took {1}".format(self.unit_upkeeper, self.unit)

0 commit comments

Comments
 (0)