From 1609a5ba544a1ef829b79e0724ced9aed902dca6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alain=20P=C3=A9teut?= Date: Thu, 27 Jun 2019 20:56:37 +0200 Subject: [PATCH] build.plat: fix dedent overrides. --- nmigen/build/plat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.30.2