From a0ace0f00c48f81892bad859d1d5b1093e8bd366 Mon Sep 17 00:00:00 2001 From: Saul Pwanson Date: Thu, 3 Oct 2024 22:14:24 -0700 Subject: [PATCH] [vds-] use blank line for sheets with no rows #2342 --- visidata/loaders/vds.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/visidata/loaders/vds.py b/visidata/loaders/vds.py index a40c21f01..689b4feb8 100644 --- a/visidata/loaders/vds.py +++ b/visidata/loaders/vds.py @@ -34,6 +34,10 @@ def save_vds(vd, p, *sheets): d['col'] = type(col).__name__ fp.write('#'+json.dumps(d)+NL) + if not vs.rows: + fp.write(NL) #2342 blank line to separate sheets without rows + continue + with Progress(gerund='saving'): for row in vs.iterdispvals(*vs.columns, format=False): d = {col.name:val for col, val in row.items()}