Skip to content

Commit

Permalink
Add assert to prevent None Environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjarne-55 committed Oct 17, 2024
1 parent dada377 commit 3252f18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mushroom_rl/core/multiprocess_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def __init__(self, env_class, *args, n_envs=-1, use_generator=False, **kwargs):
**kwargs: keyword arguments to set to the constructor or to the generator;
"""
assert env_class is not None, "Environment class requires not installed module."
assert n_envs > 1 or n_envs == -1

if n_envs == -1:
Expand Down

0 comments on commit 3252f18

Please sign in to comment.