2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

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.
This commit is contained in:
Jarrod Johnson
2025-04-16 15:34:06 -04:00
parent e46b4ede6d
commit 656dea0929

View File

@@ -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')