diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-04-25 03:43:14 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-04-25 03:43:14 (GMT) |
commit | c09cee4d92acbf77c1ca3a417975762a8ffcf59c (patch) | |
tree | 61c118973ff24636869fa4c6957cfbcf66260fe3 /Lib/pipes.py | |
parent | d29abb991518d61cfcfcdbdedfec8655cb211c1d (diff) | |
download | cpython-c09cee4d92acbf77c1ca3a417975762a8ffcf59c.zip cpython-c09cee4d92acbf77c1ca3a417975762a8ffcf59c.tar.gz cpython-c09cee4d92acbf77c1ca3a417975762a8ffcf59c.tar.bz2 |
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?
Diffstat (limited to 'Lib/pipes.py')
-rw-r--r-- | Lib/pipes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pipes.py b/Lib/pipes.py index ceb32a8..aaad0eb 100644 --- a/Lib/pipes.py +++ b/Lib/pipes.py @@ -123,10 +123,10 @@ class Template: if self.steps and self.steps[-1][1] == SINK: raise ValueError, \ 'Template.append: already ends with SINK' - if kind[0] == 'f' and not re.search('\$IN\b', cmd): + 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('\$OUT\b', cmd): + if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd): raise ValueError, \ 'Template.append: missing $OUT in cmd' self.steps.append((cmd, kind)) @@ -145,10 +145,10 @@ class Template: if self.steps and self.steps[0][1] == SOURCE: raise ValueError, \ 'Template.prepend: already begins with SOURCE' - if kind[0] == 'f' and not re.search('\$IN\b', cmd): + 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('\$OUT\b', cmd): + if kind[1] == 'f' and not re.search(r'\$OUT\b', cmd): raise ValueError, \ 'Template.prepend: missing $OUT in cmd' self.steps.insert(0, (cmd, kind)) |