From 8987d3a4cafb5128fe26154f106c1971967dd72c Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Mon, 9 Sep 2024 09:17:37 +0200 Subject: [PATCH] vppapigen: fix f-string in crcchecker Type: fix Change-Id: I9ae35b34cfd7de96726aa0b45987a896783ef7e0 Signed-off-by: Ole Troan --- extras/scripts/crcchecker.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extras/scripts/crcchecker.py b/extras/scripts/crcchecker.py index 7dcdb681e18..4a8f9b16669 100755 --- a/extras/scripts/crcchecker.py +++ b/extras/scripts/crcchecker.py @@ -40,10 +40,13 @@ def crc_from_apigen(revision, filename): if returncode.returncode != 0: print( f"vppapigen failed for {revision}:{filename} with " - "command\n {apigen}\n error: {rv}", - returncode.stderr.decode("ascii"), + f"command:\n {apigen}\n error: {returncode.returncode}", file=sys.stderr, ) + if returncode.stderr: + print(f"stderr: {returncode.stderr.decode('ascii')}", file=sys.stderr) + if returncode.stdout: + print(f"stdout: {returncode.stdout.decode('ascii')}", file=sys.stderr) sys.exit(-2) return json.loads(returncode.stdout)