From e31ed72655b638c5a09f03e97a2755243d981df1 Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Sat, 16 Oct 2021 18:49:18 +0200 Subject: [PATCH] Auto-assign missing harness title if reading from file --- src/wireviz/wireviz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wireviz/wireviz.py b/src/wireviz/wireviz.py index e22cb9af..11016192 100755 --- a/src/wireviz/wireviz.py +++ b/src/wireviz/wireviz.py @@ -115,8 +115,8 @@ def parse( # keep track of auto-generated designators to avoid duplicates autogenerated_designators = {} - # if "title" not in harness.metadata: - # harness.metadata["title"] = Path(yaml_path).stem + if "title" not in harness.metadata: + harness.metadata["title"] = Path(yaml_file).stem if yaml_file else "" # add items # parse YAML input file ====================================================