From 86c32cee19cef5c8b265d67305a38e9bdac35919 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 ====================================================