comparison bitten/queue.py @ 911:0cf576cea845

Make platform rules matching case-insensitive. Fixes #334. Patch with test by Anatoly Techtonik. Thanks!
author osimons
date Mon, 16 May 2011 21:57:27 +0000
parents ed77e3e1c43f
children
comparison
equal deleted inserted replaced
909:2c82cf261d9e 911:0cf576cea845
182 for platform in TargetPlatform.select(self.env, config=config.name): 182 for platform in TargetPlatform.select(self.env, config=config.name):
183 match = True 183 match = True
184 for propname, pattern in ifilter(None, platform.rules): 184 for propname, pattern in ifilter(None, platform.rules):
185 try: 185 try:
186 propvalue = properties.get(propname) 186 propvalue = properties.get(propname)
187 if not propvalue or not re.match(pattern, propvalue): 187 if not propvalue or not re.match(pattern,
188 propvalue, re.I):
188 match = False 189 match = False
189 break 190 break
190 except re.error: 191 except re.error:
191 self.log.error('Invalid platform matching pattern "%s"', 192 self.log.error('Invalid platform matching pattern "%s"',
192 pattern, exc_info=True) 193 pattern, exc_info=True)
Copyright (C) 2012-2017 Edgewall Software