[Python-checkins] CVS: python/dist/src/Doc/tools refcounts.py,1.2,1.3

Fred L. Drake fdrake@users.sourceforge.net
Tue, 29 May 2001 08:25:53 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv14781/tools

Modified Files:
	refcounts.py 
Log Message:

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


Index: refcounts.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/refcounts.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** refcounts.py	2000/04/10 18:24:26	1.2
--- refcounts.py	2001/05/29 15:25:51	1.3
***************
*** 33,36 ****
--- 33,38 ----
              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":