[Yum-devel] [PATCH] Use basic string matching/replacing instead of regexps where appropriate.
James Antill
james at fedoraproject.org
Tue Sep 22 20:36:05 UTC 2009
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
...also have you tested these with unicode and str?
--
James Antill <james at fedoraproject.org>
Fedora
More information about the Yum-devel
mailing list