| OLD | NEW |
| 1 # Copyright 2016 The LUCI Authors. All rights reserved. | 1 # Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Utilities for reading GCE Backend configuration.""" | 5 """Utilities for reading GCE Backend configuration.""" |
| 6 | 6 |
| 7 import collections | 7 import collections |
| 8 import logging | 8 import logging |
| 9 | 9 |
| 10 from components import utils | 10 from components import utils |
| 11 utils.fix_protobuf_package() | 11 utils.fix_protobuf_package() |
| 12 | 12 |
| 13 from google import protobuf | 13 from google import protobuf |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 zones = collections.defaultdict(set) | 101 zones = collections.defaultdict(set) |
| 102 for manager in config.managers: | 102 for manager in config.managers: |
| 103 if manager.zone in zones[manager.template_base_name]: | 103 if manager.zone in zones[manager.template_base_name]: |
| 104 context.error( | 104 context.error( |
| 105 'zone %s is not unique in template %s.', | 105 'zone %s is not unique in template %s.', |
| 106 manager.zone, | 106 manager.zone, |
| 107 manager.template_base_name, | 107 manager.template_base_name, |
| 108 ) | 108 ) |
| 109 else: | 109 else: |
| 110 zones[manager.template_base_name].add(manager.zone) | 110 zones[manager.template_base_name].add(manager.zone) |
| OLD | NEW |