Skip to content

Commit

Permalink
qapi: Fix error message format regression
Browse files Browse the repository at this point in the history
Commit 52a4741 changed reporting of errors connected to a source
location without mentioning it in the commit message.  For instance,

    $ python scripts/qapi-gen.py tests/qapi-schema/unknown-escape.json
    tests/qapi-schema/unknown-escape.json:3:21: unknown escape \x

became

    scripts/qapi-gen.py: tests/qapi-schema/unknown-escape.json:3:21: unknown escape \x

This is not how compilers report such errors, and Emacs doesn't
recognize the format.  Revert this change.

Fixes: 52a4741 (qapi-gen: Separate arg-parsing from generation)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230316071325.492471-2-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
  • Loading branch information
Markus Armbruster committed Apr 24, 2023
1 parent 327ec8d commit bc5d303
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/qapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ def main() -> int:
builtins=args.builtins,
gen_tracing=not args.suppress_tracing)
except QAPIError as err:
print(f"{sys.argv[0]}: {str(err)}", file=sys.stderr)
print(err, file=sys.stderr)
return 1
return 0

0 comments on commit bc5d303

Please sign in to comment.