Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Fix: Check whether env is registered in EnvironmentManager.enabled #4881

Merged
merged 1 commit into from
Nov 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion golem/task/envmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def set_state(self, state: Dict[EnvId, bool]) -> None:
def enabled(self, env_id: EnvId) -> bool:
""" Get the state (enabled or not) for an Environment.
Also returns false when the environment is not registered"""
if env_id not in self._state:
if env_id not in self._envs or env_id not in self._state:
return False
return self._state[env_id]

Expand Down