[rtems-central commit] specview.py: Substitute attributes during view
Sebastian Huber
sebh at rtems.org
Tue Jul 20 07:44:09 UTC 2021
Module: rtems-central
Branch: master
Commit: 62d7a6fd1a3ab4eb9af273fc564d7906235d7c0f
Changeset: http://git.rtems.org/rtems-central/commit/?id=62d7a6fd1a3ab4eb9af273fc564d7906235d7c0f
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jul 20 09:42:39 2021 +0200
specview.py: Substitute attributes during view
This helps to catch invalid attribute references.
---
specview.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/specview.py b/specview.py
index 2d980dc..7c218f7 100755
--- a/specview.py
+++ b/specview.py
@@ -82,8 +82,9 @@ _VISITORS = {
def _visit_item(item: Item, level: int) -> None:
print(f"{' ' * level}{item.uid}")
- if item.type.startswith("requirement"):
- _MAPPER.substitute(item["text"], item)
+ for name in ["text", "brief", "description", "notes"]:
+ if name in item:
+ _MAPPER.substitute(item[name], item)
try:
visitor = _VISITORS[item.type]
except KeyError:
More information about the vc
mailing list