avoid errors in some ide docs system
there are some error linked to repeated import of this module in spyder, an env with the same id cannot be registered again
This commit is contained in:
@@ -1,4 +1,10 @@
|
|||||||
from gym.envs.registration import registry, register, make, spec
|
import gym
|
||||||
|
from gym.envs.registration import registry, make, spec
|
||||||
|
def register(id,*args,**kvargs):
|
||||||
|
if id in registry.env_specs:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
return gym.envs.registration.register(id,*args,**kvargs)
|
||||||
|
|
||||||
# ------------bullet-------------
|
# ------------bullet-------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user