From ddc6faddaf855b54d307a7769602fea541174189 Mon Sep 17 00:00:00 2001 From: Marek Franciszkiewicz Date: Wed, 13 Nov 2019 17:21:08 +0100 Subject: [PATCH] Fix: Check whether env is registered in EnvironmentManager.enabled --- golem/task/envmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golem/task/envmanager.py b/golem/task/envmanager.py index dc26d53699..6447d6ae46 100644 --- a/golem/task/envmanager.py +++ b/golem/task/envmanager.py @@ -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]