From: Alain Péteut Date: Thu, 27 Jun 2019 18:56:37 +0000 (+0200) Subject: build.plat: fix dedent overrides. X-Git-Tag: locally_working~140 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1609a5ba544a1ef829b79e0724ced9aed902dca6;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)