| Index: verification/project_base.py
|
| diff --git a/verification/project_base.py b/verification/project_base.py
|
| index 34ff5e29927453f204876d7b8fb7fd8eab6794e6..5863ac33acb10bbf40cdd6072b932bc68db04382 100644
|
| --- a/verification/project_base.py
|
| +++ b/verification/project_base.py
|
| @@ -5,8 +5,12 @@
|
| """Ignores issues not using the right project base url regex."""
|
|
|
| import logging
|
| +import os
|
| import re
|
|
|
| +import find_depot_tools # pylint: disable=W0611
|
| +import breakpad
|
| +
|
| from verification import base
|
|
|
|
|
| @@ -19,10 +23,19 @@ class ProjectBaseUrlVerifier(base.Verifier):
|
| self.project_bases = project_bases
|
|
|
| def verify(self, pending, revision):
|
| - if not any(re.match(r, pending.base_url) for r in self.project_bases):
|
| + matches = filter(
|
| + None, (re.match(r, pending.base_url) for r in self.project_bases))
|
| + if not matches:
|
| logging.info('%s not in whitelist' % pending.base_url)
|
| state = base.IGNORED
|
| else:
|
| + if len(matches) != 1:
|
| + breakpad.SendStack(
|
| + Exception('pending.base_url triggered multiple matches'), '')
|
| + match = matches[0]
|
| + if match.lastindex:
|
| + pending.relpath = match.group(match.lastindex).lstrip('/').replace(
|
| + '/', os.sep)
|
| state = base.SUCCEEDED
|
| pending.verifications[self.name] = base.SimpleStatus(state)
|
|
|
|
|