X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FSessions.py;fp=PLC%2FSessions.py;h=720565d138313e2ef520786a0e2eb1b99f08cea1;hb=bf1ee443b4322709f445a6f94c53c4c1a6cafa90;hp=8dacc2ef5c16b0944a5d32c04151aae2567a998c;hpb=8201983e9b1ba59dc22649e8cdf91bab6008fd4d;p=plcapi.git diff --git a/PLC/Sessions.py b/PLC/Sessions.py index 8dacc2e..720565d 100644 --- a/PLC/Sessions.py +++ b/PLC/Sessions.py @@ -52,7 +52,7 @@ class Session(Row): # Generate 32 random bytes int8s = random.sample(range(0, 256), 32) # Base64 encode their string representation - self['session_id'] = base64.b64encode(bytes(int8s)) + self['session_id'] = base64.b64encode(bytes(int8s)).decode() # Force insert insert = True