From ae51ac07402aa70b2b17a6b63219a5ca8ddf154b Mon Sep 17 00:00:00 2001 From: jaimergp Date: Wed, 20 Dec 2023 13:22:30 +0100 Subject: [PATCH] allow None --- constructor/construct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constructor/construct.py b/constructor/construct.py index 71934da7e..ba9210479 100644 --- a/constructor/construct.py +++ b/constructor/construct.py @@ -776,7 +776,7 @@ def verify(info): if key not in _EXTRA_ENVS_SCHEMA: sys.exit(f"Key '{key}' not supported in 'extra_envs'.") types = _EXTRA_ENVS_SCHEMA[key] - if not isinstance(value, types): + if value is not None and not isinstance(value, types): types_str = " or ".join([type_.__name__ for type_ in types]) sys.exit(f"Value for 'extra_envs.{env_name}.{key}' " f"must be an instance of {types_str}")