mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
If the input line does not contain enough fields, raise a meaningful
error.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user