(info)
| 159 | |
| 160 | |
| 161 | def verify(info): |
| 162 | schema = json.loads(SCHEMA_PATH.read_text()) |
| 163 | validator = get_validator_class()(schema) |
| 164 | errors = [] |
| 165 | for error_or_warning in validator.iter_errors(info): |
| 166 | if isinstance(error_or_warning, DeprecatedFieldWarning): |
| 167 | print("Warning:", error_or_warning, file=sys.stderr) |
| 168 | else: |
| 169 | errors.append(error_or_warning) |
| 170 | if errors: |
| 171 | msg = ["Configuration has validation errors:"] |
| 172 | for error in errors: |
| 173 | msg.append(f"- {error}") |
| 174 | sys.exit("\n".join(msg)) |
| 175 | |
| 176 | if signtool := info.get("windows_signing_tool"): |
| 177 | need_cert_file = ["signtool", "signtool.exe"] |
| 178 | if signtool in need_cert_file and not info.get("signing_certificate"): |
| 179 | sys.exit(f"The signing tool '{signtool}' requires 'signing_certificate' to be set.") |
nothing calls this directly
no test coverage detected