Skip to content

Commit 49c7685

Browse files
amotlkvid
andcommitted
Improve gracefulness when invoking wireviz.parse() without file_out
This happened to be a regression for WireViz-Web [1], which aims to do as much in memory as possible. [1] https://github.com/daq-tools/wireviz-web. kvid rebased and mixed original commit with similar change by Daniel Rojas Co-authored-by: kvid <kvid@users.noreply.github.com>
1 parent d680361 commit 49c7685

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wireviz/wireviz.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ def parse(
115115
# keep track of auto-generated designators to avoid duplicates
116116
autogenerated_designators = {}
117117

118+
# When title is not given, either deduce it from filename, or use default text.
118119
if "title" not in harness.metadata:
119-
harness.metadata["title"] = Path(yaml_file).stem if yaml_file else ""
120+
harness.metadata["title"] = Path(yaml_file).stem if yaml_file else "WireViz diagram and BOM"
120121

121122
# add items
122123
# parse YAML input file ====================================================

0 commit comments

Comments
 (0)