[Python-checkins] CVS: python/dist/src/Lib pipes.py,1.8,1.9

Tim Peters tim_one@users.sourceforge.net
Tue, 24 Apr 2001 20:43:16 -0700


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

Modified Files:
	pipes.py 
Log Message:
SF bug 418615: regular expression bug in pipes.py.
Obviously bad regexps, spotted by Jeffery Collins.

HELP!  I can't run this on Windows, and the module test() function
probably doesn't work on anyone's box.  Could a Unixoid please write
an at least minimal working test and add it to the std test suite?


Index: pipes.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pipes.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** pipes.py	2001/02/07 23:14:30	1.8
--- pipes.py	2001/04/25 03:43:14	1.9
***************
*** 124,131 ****
              raise ValueError, \
                    'Template.append: already ends with SINK'
!         if kind[0] == 'f' and not re.search('\$IN\b', cmd):
              raise ValueError, \
                    'Template.append: missing $IN in cmd'
!         if kind[1] == 'f' and not re.search('\$OUT\b', cmd):
              raise ValueError, \
                    'Template.append: missing $OUT in cmd'
--- 124,131 ----
              raise ValueError, \
                    'Template.append: already ends with SINK'
!         if kind[0] == 'f' and not re.search(r'\$IN\b', cmd):
              raise ValueError, \
                    'Template.append: missing $IN in cmd'
!         if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd):
              raise ValueError, \
                    'Template.append: missing $OUT in cmd'
***************
*** 146,153 ****
              raise ValueError, \
                    'Template.prepend: already begins with SOURCE'
!         if kind[0] == 'f' and not re.search('\$IN\b', cmd):
              raise ValueError, \
                    'Template.prepend: missing $IN in cmd'
!         if kind[1] == 'f' and not re.search('\$OUT\b', cmd):
              raise ValueError, \
                    'Template.prepend: missing $OUT in cmd'
--- 146,153 ----
              raise ValueError, \
                    'Template.prepend: already begins with SOURCE'
!         if kind[0] == 'f' and not re.search(r'\$IN\b', cmd):
              raise ValueError, \
                    'Template.prepend: missing $IN in cmd'
!         if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd):
              raise ValueError, \
                    'Template.prepend: missing $OUT in cmd'