From 0cd2cd5adddc549b54d7a87281e10c1d42e2284a Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 7 Dec 2023 23:18:49 +0100 Subject: [PATCH] clearer code --- recipes/wordpress/tests_wordpress/runner_wordpress.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/wordpress/tests_wordpress/runner_wordpress.py b/recipes/wordpress/tests_wordpress/runner_wordpress.py index f79bd51..9072bc5 100644 --- a/recipes/wordpress/tests_wordpress/runner_wordpress.py +++ b/recipes/wordpress/tests_wordpress/runner_wordpress.py @@ -2,9 +2,8 @@ from pytest_abra import Runner, Test def condition_has_locale(env_config: dict[str, str]) -> bool: - if "LOCALE" in env_config: - if "de" in env_config["LOCALE"]: - return True + if "de" in env_config.get("LOCALE", ""): + return True return False