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 parent
0ce40b70c0
commit
3011cf1130
1 file changed
+7
-1
@@ -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-------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user