[Python-checkins] python/dist/src/Lib textwrap.py,1.24,1.25

gward@users.sourceforge.net gward@users.sourceforge.net
Tue, 06 May 2003 17:55:39 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv19191

Modified Files:
	textwrap.py 
Log Message:
SF #726446: raise ValueError if width <= 0.


Index: textwrap.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/textwrap.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** textwrap.py	14 Feb 2003 01:14:15 -0000	1.24
--- textwrap.py	7 May 2003 00:55:35 -0000	1.25
***************
*** 198,201 ****
--- 198,203 ----
          """
          lines = []
+         if self.width <= 0:
+             raise ValueError("invalid width %r (must be > 0)" % self.width)
  
          while chunks: