Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Tom Wijsman <tomwij@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH 3/3] Have repoman deprecate G2CONF for the GNOME team. (bug #482084).
Date: Sun, 19 Jan 2014 09:26:33
Message-Id: 201401190426.29715.vapier@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 3/3] Have repoman deprecate G2CONF for the GNOME team. (bug #482084). by Tom Wijsman
1 On Wednesday 15 January 2014 19:07:20 Tom Wijsman wrote:
2 > +class DeprecateG2CONF(LineCheck):
3 > + repoman_check_name = 'G2CONF.deprecated'
4 > + re = re.compile(r'.*G2CONF.*')
5 > +
6 > + def check(self, num, line):
7 > + """Run the check on line and return error if there is one"""
8 > + m = self.re.match(line)
9
10 use re.search instead of re.match so you can drop the redundant ".*".
11 further, i think you want to use word boundaries. so:
12 re = re.compile(r'\bG2CONF\b')
13 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature