# HG changeset patch
# User Edouard Tisserant <edouard@beremiz.fr>
# Date 1740583993 -3600
# Node ID f9f116d8a022cb3cb01c110dc926f9cdf6a80057
# Parent  49e297aaf694b86261b8b716c6ce7eb8615bddb0
fix random python 3 porting consequences.

diff -r 49e297aaf694 -r f9f116d8a022 runtime/Stunnel.py
--- a/runtime/Stunnel.py	Wed Feb 26 16:31:59 2025 +0100
+++ b/runtime/Stunnel.py	Wed Feb 26 16:33:13 2025 +0100
@@ -30,7 +30,7 @@
     secret = os.urandom(192)  # int(256/1.3333)
     secretstring = b2a_base64(secret)
 
-    PSKstring = ID+":"+secretstring
+    PSKstring = ID+":"+secretstring.decode()
     with open(PSKpath, 'w') as f:
         f.write(PSKstring)
     restartStunnel()
diff -r 49e297aaf694 -r f9f116d8a022 runtime/WampClient.py
--- a/runtime/WampClient.py	Wed Feb 26 16:31:59 2025 +0100
+++ b/runtime/WampClient.py	Wed Feb 26 16:33:13 2025 +0100
@@ -362,7 +362,7 @@
     if os.path.exists(_WampTrust):
         cert = crypto.load_certificate(
             crypto.FILETYPE_PEM,
-            six.u(open(_WampTrust, 'r').read())
+            open(_WampTrust, 'rb').read()
         )
         trustRoot=OpenSSLCertificateAuthorities([cert])
     return optionsForClientTLS(_transportFactory.host, trustRoot=trustRoot)