fix: fix proxy setup
This commit is contained in:
@@ -197,6 +197,9 @@ class DesktopEnv(gym.Env):
|
||||
logger.info("Emulator started.")
|
||||
|
||||
if task_config is not None:
|
||||
if task_config.get("proxy", False) and self.enable_proxy:
|
||||
# If using proxy and proxy is enabled, set up the proxy configuration
|
||||
self.setup_controller._proxy_setup()
|
||||
self._set_task_info(task_config)
|
||||
self.setup_controller.reset_cache_dir(self.cache_dir)
|
||||
logger.info("Setting up environment...")
|
||||
@@ -214,10 +217,6 @@ class DesktopEnv(gym.Env):
|
||||
break
|
||||
|
||||
logger.info("Environment setup complete.")
|
||||
|
||||
if task_config.get("proxy", False) and self.enable_proxy:
|
||||
# If using proxy and proxy is enabled, set up the proxy configuration
|
||||
self.setup_controller._proxy_setup()
|
||||
|
||||
observation = self._get_obs()
|
||||
return observation
|
||||
|
||||
Reference in New Issue
Block a user