Fixed PYRO's PSK_Adapter : monkey patching was breaking non-PSK protocol, and import ssl was missing.
authorEdouard Tisserant
Mon, 22 Oct 2018 12:58:10 +0200
changeset 2318 8925d487605a
parent 2317 b7330f3461dd
child 2319 0a951f528c69
Fixed PYRO's PSK_Adapter : monkey patching was breaking non-PSK protocol, and import ssl was missing.
connectors/PYRO/PSK_Adapter.py
--- a/connectors/PYRO/PSK_Adapter.py	Fri Oct 19 13:34:52 2018 +0200
+++ b/connectors/PYRO/PSK_Adapter.py	Mon Oct 22 12:58:10 2018 +0200
@@ -4,6 +4,7 @@
 import socket
 import re
 import sslpsk
+import ssl
 import Pyro
 from Pyro.core import PyroURI
 from Pyro.protocol import _connect_socket,TCPConnection,PYROAdapter
@@ -63,7 +64,7 @@
 def getProtocolAdapter(protocol):
     if protocol in ('PYROPSK', 'PYROLOCPSK'):
         return PYROPSKAdapter()
-    _getProtocolAdapter(protocol)
+    return _getProtocolAdapter(protocol)
 
 Pyro.protocol.getProtocolAdapter = getProtocolAdapter