From 3423ed9872f7d8302f7661395b4cf4c3d7c5eed1 Mon Sep 17 00:00:00 2001 From: Uiri Date: Mon, 4 Mar 2013 16:59:01 -0500 Subject: [PATCH] Fix issue with [] as keygroup name mentioned in #4 --- toml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toml.py b/toml.py index 037c64c..b2d550d 100644 --- a/toml.py +++ b/toml.py @@ -56,6 +56,8 @@ def loads(s): if line[1].strip() != "": raise Exception("Key group not on a line by itself.") line = line[0] + if line == "": + raise Exception("Can't have a keygroup with an empty name") groups = line.split('.') currentlevel = retval for i in xrange(len(groups)):