From 542aea2fe47d6498f277dad79a5a98e0af3e62ae Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Sun, 24 May 2020 15:05:59 +0200 Subject: [PATCH] Improve handling of empty lists when nesting --- src/wireviz.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wireviz.py b/src/wireviz.py index 11efcf1..2e3928f 100644 --- a/src/wireviz.py +++ b/src/wireviz.py @@ -261,7 +261,9 @@ def nested(input): for x in input: if isinstance(x, list): if len(x) > 0: - l.append('{' + nested(x) + '}') + n = nested(x) + if n != '': + l.append('{' + n + '}') else: if x is not None: if x != '':