2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-07-24 21:31:13 +00:00

Have screenshots become normal text

Base64 comes out as ASCII bytes, change to text for
json handling.
This commit is contained in:
Jarrod Johnson
2025-04-14 07:53:40 -04:00
parent 6d1da85991
commit 35e3ca1f1f

View File

@@ -1886,7 +1886,7 @@ class GraphicalConsole(ConfluentMessage):
class ScreenShot(ConfluentMessage):
readonly = True
def __init__(self, imgdata, node, imgformat=None):
self.kvpairs = {node: {'image': {'imgformat': imgformat, 'imgdata': base64.b64encode(imgdata)}}}
self.kvpairs = {node: {'image': {'imgformat': imgformat, 'imgdata': base64.b64encode(imgdata).decode()}}}
class CryptedAttributes(Attributes):