summaryrefslogtreecommitdiffstats
path: root/Doc/tools/refcounts.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-29 15:25:51 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-29 15:25:51 (GMT)
commit404ac9720705e5245e0737f4e35d4acd9142da67 (patch)
tree705173d76493ec21f622f912deb631346e1dce6b /Doc/tools/refcounts.py
parentfac312ff88884a8101ce3edc937aa7fa1b0bad5e (diff)
downloadcpython-404ac9720705e5245e0737f4e35d4acd9142da67.zip
cpython-404ac9720705e5245e0737f4e35d4acd9142da67.tar.gz
cpython-404ac9720705e5245e0737f4e35d4acd9142da67.tar.bz2
If the input line does not contain enough fields, raise a meaningful
error.
Diffstat (limited to 'Doc/tools/refcounts.py')
-rw-r--r--Doc/tools/refcounts.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/tools/refcounts.py b/Doc/tools/refcounts.py
index 90f47d0..d7c761b 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