add --debug option to validate
Add a --debug option to the validate command line app to have it throw an exception when there is an error so we can pinpoint where the error is coming from more easily. Change-Id: I2f9a23d99105e59985327fce596f77bd3f6e8293 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
@@ -816,6 +816,12 @@ def main():
|
||||
action='store_false',
|
||||
help='do not remove temporary files',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--debug',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='throw exception on error',
|
||||
)
|
||||
parser.add_argument(
|
||||
'input',
|
||||
nargs='*',
|
||||
@@ -872,6 +878,8 @@ def main():
|
||||
def mk_error(msg):
|
||||
print('ERROR: {}'.format(msg))
|
||||
errors.append('{}: {}'.format(filename, msg))
|
||||
if args.debug:
|
||||
raise RuntimeError(msg)
|
||||
|
||||
validate_schema(deliverable_info, mk_warning, mk_error)
|
||||
validate_bugtracker(deliverable_info, mk_warning, mk_error)
|
||||
|
||||
Reference in New Issue
Block a user