Skip to content

Commit

Permalink
[python/tests/utils]game_controller.py] Propagate exceptions (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
cool-RR authored Jan 4, 2023
1 parent ea4219e commit b1db91a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tests/utils/game_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ def rotation_velocity(self):
def _observations(self):
try:
return self._env.observations()
except RuntimeError:
except RuntimeError as e:
if self._env.is_running():
raise
else:
raise EpisodeFinishedError()
raise EpisodeFinishedError from e

def _get_empty_actions(self):
return np.zeros([len(self._action_index)], dtype=np.intc)
Expand Down

0 comments on commit b1db91a

Please sign in to comment.