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>
This commit is contained in:
parent
d680361556
commit
49c7685bb2
@ -115,8 +115,9 @@ def parse(
|
||||
# keep track of auto-generated designators to avoid duplicates
|
||||
autogenerated_designators = {}
|
||||
|
||||
# When title is not given, either deduce it from filename, or use default text.
|
||||
if "title" not in harness.metadata:
|
||||
harness.metadata["title"] = Path(yaml_file).stem if yaml_file else ""
|
||||
harness.metadata["title"] = Path(yaml_file).stem if yaml_file else "WireViz diagram and BOM"
|
||||
|
||||
# add items
|
||||
# parse YAML input file ====================================================
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user