[Patches] [ python-Patches-418613 ] regular expression bug in pipes.py

noreply@sourceforge.net noreply@sourceforge.net
Mon, 30 Apr 2001 15:14:40 -0700


Patches item #418613, was updated on 2001-04-24 11:47
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=418613&group_id=5470

Category: library
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jeffery D. Collins (tokeneater)
>Assigned to: Tim Peters (tim_one)
Summary: regular expression bug in pipes.py

Initial Comment:
I tried running the test() function in pipes.py, but the following exception was raised:

>>> import pipes
>>> t = pipes.Template()
>>> t.append('x $IN $OUT', 'ff')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.1/pipes.py", line 127, in append
    raise ValueError, ValueError: Template.append: missing $IN in cmd
>

After some experimenting, I discovered that the regular expression argument to re.search() contains the character '\b', which is interpreted by the string object as a backspace.  Those strings have now been changed to raw strings to avoid this problem.

I suppose that this module is not widely used.  This problem appears in versions as far back as 1.5.2.




----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2001-04-30 15:14

Message:
Logged In: YES 
user_id=31435

Just closed this.  The bug is already fixed, and there's no 
patch here anyway.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=418613&group_id=5470