Skip to content

Commit 1d3938c

Browse files
committed
[ot] scripts/opentitan: pyot.py: emit a warning when unknown placeholder is detected
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
1 parent c5eeebe commit 1d3938c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/opentitan/pyot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,9 @@ def replace(smo: re.Match) -> str:
593593
name = smo.group(1)
594594
val = self._env[name] if name in self._env \
595595
else environ.get(name, '')
596+
if not val:
597+
getLogger('pyot.file').warning("Unknown placeholder '%s'",
598+
name)
596599
return val
597600
svalue = str(value)
598601
nvalue = re.sub(r'\$\{(\w+)\}', replace, svalue)

0 commit comments

Comments
 (0)