From: Alain Péteut Date: Thu, 27 Jun 2019 18:56:37 +0000 (+0200) Subject: build.plat: fix dedent overrides. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4222af2edbdf707dd999522c1e79c473f844316b;p=nmigen.git build.plat: fix dedent overrides. --- diff --git a/nmigen/build/plat.py b/nmigen/build/plat.py index 2f198a8..7de062a 100644 --- a/nmigen/build/plat.py +++ b/nmigen/build/plat.py @@ -236,7 +236,10 @@ class TemplatedPlatform(Platform): # `export VAR=` is treated on Linux. return re.sub(r'^\"\"$', "", os.environ[var_env]) elif var in kwargs: - return textwrap.dedent(kwargs[var]).strip() + if isinstance(kwargs[var], str): + return textwrap.dedent(kwargs[var]).strip() + else: + return kwargs[var] else: return jinja2.Undefined(name=var)