Simplify strict updatability linting error message

Throwing a RuntimeError leads to a stack trace in the build failure
error message, which is not useful and makes the error harder to
understand.

Bug: 320698986
Test: Presubmits
Change-Id: I0b79185fff7b9c8d4085b23936b80b3d026a4384
This commit is contained in:
Cole Faust 2024-01-17 17:11:51 -08:00
parent 6794cc20c5
commit 9809860ea8

View file

@ -18,6 +18,7 @@
"""This file generates project.xml and lint.xml files used to drive the Android Lint CLI tool."""
import argparse
import sys
from xml.dom import minidom
from ninja_rsp import NinjaRspFileReader
@ -159,8 +160,8 @@ def main():
if args.baseline_path:
baseline = minidom.parse(args.baseline_path)
disallowed_issues = check_baseline_for_disallowed_issues(baseline, args.disallowed_issues)
if bool(disallowed_issues):
raise RuntimeError('disallowed issues %s found in lint baseline file %s for module %s'
if disallowed_issues:
sys.exit('disallowed issues %s found in lint baseline file %s for module %s'
% (disallowed_issues, args.baseline_path, args.name))
if args.project_out: