aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/qapi/source.py
diff options
context:
space:
mode:
authorMads Ynddal <m.ynddal@samsung.com>2023-09-26 12:34:25 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2023-09-26 12:28:51 -0400
commitf7bd4f0237ec394198940f5b81cbde280c5b5c01 (patch)
tree140dc990e783df44579adbb1f710a9f305ee46fb /scripts/qapi/source.py
parentsimpletrace: annotate magic constants from QEMU code (diff)
downloadqemu-f7bd4f0237ec394198940f5b81cbde280c5b5c01.tar.xz
qemu-f7bd4f0237ec394198940f5b81cbde280c5b5c01.zip
simpletrace: improve parsing of sys.argv; fix files never closed.
The arguments extracted from `sys.argv` named and unpacked to make it clear what the arguments are and what they're used for. The two input files were opened, but never explicitly closed. File usage changed to use `with` statement to take care of this. At the same time, ownership of the file-object is moved up to `run` function. Added option to process to support file-like objects. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Mads Ynddal <m.ynddal@samsung.com> Message-id: 20230926103436.25700-4-mads@ynddal.dk Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions