Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
cclauss authored Jul 19, 2018
commit f293b9cb9e24b8aeb6bd9a53b5ed4687a1d8f062
1 change: 1 addition & 0 deletions sc2reader/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def run(self, replay):
# the front of the line for immediate processing.
while len(event_queue) > 0:
event = event_queue.popleft()
assert event.player, 'Event with no player: {}'.format(event)

if event.name == 'PluginExit':
# Remove the plugin and reset the handlers.
Expand Down