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:
cedspam
2018-01-26 09:29:39 +00:00
committed by GitHub
parent 0ce40b70c0
commit 3011cf1130

View File

@@ -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-------------