mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
If the input line does not contain enough fields, raise a meaningful
error.
This commit is contained in:
parent
fac312ff88
commit
404ac97207
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue