--- a/connectors/PYRO/PSK_Adapter.py Thu Oct 18 11:01:14 2018 +0200
+++ b/connectors/PYRO/PSK_Adapter.py Thu Oct 18 13:17:48 2018 +0200
@@ -2,8 +2,10 @@
from __future__ import print_function
+from Pyro.core import PyroURI from Pyro.protocol import _connect_socket,TCPConnection,PYROAdapter
from Pyro.errors import ConnectionDeniedError, ProtocolError
from Pyro.util import Log
@@ -45,8 +47,8 @@
Log.msg('PYROAdapter','connected to',str(URI))
- if URI.protocol=='PYROLOC':
- self.resolvePYROLOC_URI("PYRO") # updates self.URI
+ if URI.protocol=='PYROLOCPSK': + self.resolvePYROLOC_URI("PYROPSK") # updates self.URI elif msg[:len(self.denyMSG)]==self.denyMSG:
raise ConnectionDeniedError(Pyro.constants.deniedReasons[int(msg[-1])])
@@ -64,3 +66,18 @@
Pyro.protocol.getProtocolAdapter = getProtocolAdapter
+_processStringURI = Pyro.core.processStringURI +def processStringURI(URI): + x=re.match(r'(?P<protocol>PYROLOCPSK)://(?P<hostname>[^\s:]+):?(?P<port>\d+)?/(?P<name>\S*)',URI) + protocol=x.group('protocol') + hostname=x.group('hostname') + return PyroURI(hostname,name,port,protocol) + return _processStringURI(URI) +Pyro.core.processStringURI = processStringURI --- a/connectors/PYRO/__init__.py Thu Oct 18 11:01:14 2018 +0200
+++ b/connectors/PYRO/__init__.py Thu Oct 18 13:17:48 2018 +0200
@@ -53,7 +53,7 @@
servicetype, location = uri.split("://")
if servicetype == "PYROS":
import connectors.PYRO.PSK_Adapter
+ schemename = "PYROLOCPSK" url, ID = location.split('#')
secpath = os.path.join(str(confnodesroot.ProjectPath), 'psk', ID+'.secret')