From: Fred Drake Date: Tue, 29 May 2001 15:25:51 +0000 (+0000) Subject: If the input line does not contain enough fields, raise a meaningful X-Git-Tag: v2.2a3~1657 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=404ac9720705e5245e0737f4e35d4acd9142da67;p=thirdparty%2FPython%2Fcpython.git If the input line does not contain enough fields, raise a meaningful error. --- diff --git a/Doc/tools/refcounts.py b/Doc/tools/refcounts.py index 90f47d061db4..d7c761b41e22 100644 --- a/Doc/tools/refcounts.py +++ b/Doc/tools/refcounts.py @@ -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