remove hasattr calls

This commit is contained in:
Timothy Pogue 2022-09-27 22:35:15 -06:00
parent 9e36b0d2ea
commit 099137adac

View File

@ -94,8 +94,8 @@ class ReinforcementLearner_multiproc(BaseReinforcementLearningModel):
Hook called on bot shutdown. Close SubprocVecEnv subprocesses for clean shutdown.
"""
if hasattr(self, "train_env") and self.train_env:
if self.train_env:
self.train_env.close()
if hasattr(self, "eval_env") and self.eval_env:
if self.eval_env:
self.eval_env.close()