mirror of
https://github.com/YosysHQ/sby.git
synced 2025-10-04 08:43:58 +00:00
Use tabs in csv output
Also add a `.replace` to escape any tabs in the output just to be safe.
This commit is contained in:
parent
ac120cee92
commit
0d06b377db
1 changed files with 8 additions and 2 deletions
|
@ -520,7 +520,7 @@ def format_status_data_csvline(row: dict|None) -> str:
|
||||||
"trace",
|
"trace",
|
||||||
"depth",
|
"depth",
|
||||||
]
|
]
|
||||||
return ','.join(csv_header)
|
return '\t'.join(csv_header)
|
||||||
else:
|
else:
|
||||||
engine = row['data'].get('engine', row['data'].get('source'))
|
engine = row['data'].get('engine', row['data'].get('source'))
|
||||||
try:
|
try:
|
||||||
|
@ -546,7 +546,13 @@ def format_status_data_csvline(row: dict|None) -> str:
|
||||||
trace_path,
|
trace_path,
|
||||||
depth,
|
depth,
|
||||||
]
|
]
|
||||||
return ','.join("" if v is None else str(v) for v in csv_line)
|
def escape_str(v):
|
||||||
|
if v is None:
|
||||||
|
return ""
|
||||||
|
v_str = str(v)
|
||||||
|
# this shouldn't ever happen, but just in case
|
||||||
|
return v_str.replace('\t', "\\t")
|
||||||
|
return '\t'.join(escape_str(v) for v in csv_line)
|
||||||
|
|
||||||
def filter_latest_task_ids(all_tasks: dict[int, dict[str]]):
|
def filter_latest_task_ids(all_tasks: dict[int, dict[str]]):
|
||||||
latest: dict[str, int] = {}
|
latest: dict[str, int] = {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue