Skip to content

Commit f293b9c

Browse files
author
cclauss
authored
Early detection of events without a player
There are a class of issues like #61 where __event.player is None__ so this PR tries to detect that condition higher in the call stack.
1 parent cc364ff commit f293b9c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sc2reader/engine/engine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def run(self, replay):
151151
# the front of the line for immediate processing.
152152
while len(event_queue) > 0:
153153
event = event_queue.popleft()
154+
assert event.player, 'Event with no player: {}'.format(event)
154155

155156
if event.name == 'PluginExit':
156157
# Remove the plugin and reset the handlers.

0 commit comments

Comments
 (0)