Prevent not having any sections at all for argparseSections

This commit is contained in:
Florian Festi 2019-11-22 16:47:41 +01:00
parent 45e9fdc68a
commit 182d222f01
1 changed files with 3 additions and 0 deletions

View File

@ -173,6 +173,9 @@ def argparseSections(s):
except ValueError: except ValueError:
raise argparse.ArgumentTypeError("Don't understand sections string") raise argparse.ArgumentTypeError("Don't understand sections string")
if not result:
result.append(0.0)
return result return result
class ArgparseEdgeType: class ArgparseEdgeType: