From 182d222f012b06df4f46bbbcb395ef9d9d379872 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Fri, 22 Nov 2019 16:47:41 +0100 Subject: [PATCH] Prevent not having any sections at all for argparseSections --- boxes/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boxes/__init__.py b/boxes/__init__.py index 6153e0e..0105f71 100755 --- a/boxes/__init__.py +++ b/boxes/__init__.py @@ -173,6 +173,9 @@ def argparseSections(s): except ValueError: raise argparse.ArgumentTypeError("Don't understand sections string") + if not result: + result.append(0.0) + return result class ArgparseEdgeType: