From 656dea0929300810f1b6fd75f157330140f9d60d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 16 Apr 2025 15:34:06 -0400 Subject: [PATCH] Add error for failure to get screenshot Usually this is due to the target not having a license key, in the case of Lenovo equipment. --- confluent_client/bin/nodeconsole | 3 +++ 1 file changed, 3 insertions(+) diff --git a/confluent_client/bin/nodeconsole b/confluent_client/bin/nodeconsole index aafdb1f7..c2443649 100755 --- a/confluent_client/bin/nodeconsole +++ b/confluent_client/bin/nodeconsole @@ -167,6 +167,9 @@ if options.screenshot: for node in res.get('databynode', {}): imgdata = res['databynode'][node].get('image', {}).get('imgdata', None) if imgdata: + if len(imgdata) < 32: # We were subjected to error + sys.stderr.write(f'{node}: Unable to get screenshot\n') + continue sys.stdout.write('{}: '.format(node)) draw_image(imgdata.encode()) sys.stdout.write('\n')