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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user