Skip to content

Commit

Permalink
Fix issue with [] as keygroup name mentioned in #4
Browse files Browse the repository at this point in the history
  • Loading branch information
uiri committed Mar 4, 2013
1 parent aa2fabb commit 3423ed9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down

0 comments on commit 3423ed9

Please sign in to comment.