Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """CQ config validation library.""" | 6 """CQ config validation library.""" |
| 7 | 7 |
| 8 import argparse | 8 import argparse |
| 9 # This file was originally copied together with the cq_client library from the | 9 from google import protobuf |
| 10 # internal commit_queue repository and then modified to import protobuf26 | |
|
Sergiy Byelozyorov
2015/12/01 10:27:54
same here
| |
| 11 # instead of google.protobuf to prevent conflicts with a different version of | |
| 12 # google.protobuf that some users of depot_tools have installed. If you need to | |
| 13 # update this file, please make similar changes again and add this comment back. | |
| 14 # More details on why we chose to rename the package can be found in the file | |
| 15 # depot_tools/third_party/protobuf26/README.chromium. | |
| 16 import protobuf26 as protobuf | |
| 17 import logging | 10 import logging |
| 18 import re | 11 import re |
| 19 import sys | 12 import sys |
| 20 | 13 |
| 21 from cq_client import cq_pb2 | 14 from cq_client import cq_pb2 |
| 22 | 15 |
| 23 | 16 |
| 24 REQUIRED_FIELDS = [ | 17 REQUIRED_FIELDS = [ |
| 25 'version', | 18 'version', |
| 26 'verifiers', | 19 'verifiers', |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 for base in config.rietveld.project_bases: | 109 for base in config.rietveld.project_bases: |
| 117 try: | 110 try: |
| 118 re.compile(base) | 111 re.compile(base) |
| 119 except re.error: | 112 except re.error: |
| 120 logging.error('failed to parse "%s" in project_bases as a regexp', base) | 113 logging.error('failed to parse "%s" in project_bases as a regexp', base) |
| 121 return False | 114 return False |
| 122 | 115 |
| 123 # TODO(sergiyb): For each field, check valid values depending on its | 116 # TODO(sergiyb): For each field, check valid values depending on its |
| 124 # semantics, e.g. email addresses, regular expressions etc. | 117 # semantics, e.g. email addresses, regular expressions etc. |
| 125 return True | 118 return True |
| OLD | NEW |