From 2f6d44138b5ad8ce0aa0220bf88c255ee97184f3 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 16 Aug 2022 21:43:26 +0300 Subject: [PATCH] pysvp64dis: dump to output file; use explicit arguments --- src/openpower/sv/trans/pysvp64dis.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/openpower/sv/trans/pysvp64dis.py b/src/openpower/sv/trans/pysvp64dis.py index 6f8d4cf4..4bd056f9 100644 --- a/src/openpower/sv/trans/pysvp64dis.py +++ b/src/openpower/sv/trans/pysvp64dis.py @@ -111,11 +111,15 @@ def main(): type=_argparse.FileType("w"), default=_sys.stdout) parser.add_argument("-b", "--byteorder", type=ByteOrder, default=ByteOrder.LITTLE) + args = dict(vars(parser.parse_args())) + ifile = args["ifile"] + ofile = args["ofile"] + byteorder = args["byteorder"] - insns = load(**args) - for line in dump(insns, **args): - print(line) + insns = load(ifile, byteorder) + for line in dump(insns, byteorder): + print(line, file=ofile) if __name__ == "__main__": -- 2.30.2