From b02ac2e076860d3df9dd8bccce81d626fc1cc9eb Mon Sep 17 00:00:00 2001 From: Ralf Date: Sun, 2 Jun 2024 19:10:49 +0200 Subject: [PATCH] Update pym/bob/input.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jan Klötzke --- pym/bob/input.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/bob/input.py b/pym/bob/input.py index 36b7286a..cb8e6308 100644 --- a/pym/bob/input.py +++ b/pym/bob/input.py @@ -405,9 +405,10 @@ class CheckoutAssert: schema.Optional('end') : schema.And(int, lambda n: n >= 1), }) - def __init__(self, spec, env=Env()): - spec = {k: ( env.substitute(v, "checkoutAssert::"+ k) if isinstance(v, str) else v) - for (k, v) in spec.items()} + def __init__(self, spec, env=None): + if env is not None: + spec = {k: ( env.substitute(v, "checkoutAssert::"+ k) if isinstance(v, str) else v) + for (k, v) in spec.items()} self.__source = spec['__source'] self.__file = spec['file'] self.__digestSHA1 = spec['digestSHA1']