Commit 404ac972 authored by Fred Drake's avatar Fred Drake

If the input line does not contain enough fields, raise a meaningful

error.
parent fac312ff
......@@ -32,6 +32,8 @@ def loadfile(fp):
# blank lines and comments
continue
parts = string.split(line, ":", 4)
if len(parts) != 5:
raise ValueError("Not enough fields in " + `line`)
function, type, arg, refcount, comment = parts
if refcount == "null":
refcount = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment