[Yum-devel] [PATCH] Use basic string matching/replacing instead of regexps where appropriate.

James Antill james at fedoraproject.org
Wed Sep 23 13:22:04 UTC 2009


On Wed, 2009-09-23 at 00:34 +0300, Ville Skyttä wrote:
> On Tuesday 22 September 2009, James Antill wrote:
> > On Tue, 2009-09-22 at 23:04 +0300, Ville Skyttä wrote:
> > > +    return 'bin/' in filename or filename.startswith('/etc/') or \
> > > +        filename == '/usr/lib/sendmail'
> > 
> >  Could you do these as:
> > 
> > if 'bin/' in filename:
> >      return True
> > if filenam.startswith('/etc/'):
> >      return True
> > if filename == '/usr/lib/sendmail':
> >      return True
> > return False
> 
> Sure, revised patch attached.
>
> > ...also have you tested these with unicode and str?
> 
> Yes, on Fedora 11 (Python 2.6).

 Pushed, thanks.

-- 
James Antill <james at fedoraproject.org>
Fedora


More information about the Yum-devel mailing list