aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2001-07-12 12:28:10 +0000
committerThomas Wouters <thomas@python.org>2001-07-12 12:28:10 +0000
commitd7fe69f30a7821020bb105d5722f1753933db0ee (patch)
treef9703ad80d7ec84435bd55d10ddc250cf27e3d7b
parentBackport Tim's checkin 1.7: (diff)
downloadcpython-d7fe69f30a7821020bb105d5722f1753933db0ee.tar.gz
cpython-d7fe69f30a7821020bb105d5722f1753933db0ee.tar.bz2
cpython-d7fe69f30a7821020bb105d5722f1753933db0ee.zip
Backport Tim's checkin 1.9:
SF bug 418615: regular expression bug in pipes.py. Obviously bad regexps, spotted by Jeffery Collins.
-rw-r--r--Lib/pipes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pipes.py b/Lib/pipes.py
index ceb32a86978..aaad0ebd11b 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))