X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FSessions.py;h=720565d138313e2ef520786a0e2eb1b99f08cea1;hb=ae8b10f8363f7a1df02e77cbd820904c4ded10b8;hp=8dacc2ef5c16b0944a5d32c04151aae2567a998c;hpb=aed64f31afdf04bdd6e22f3b1efdd61a2d63174a;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