--- a/runtime/WampClient.py Mon Feb 09 13:38:00 2015 +0100
+++ b/runtime/WampClient.py Tue Feb 10 00:25:17 2015 +0100
@@ -27,12 +27,12 @@
"ResetLogCount",
]
-def MakeCallee(name):
+def GetCallee(name):
global _PySrv
- def Callee(*args,**kwargs):
- return getattr(_PySrv.plcobj, name)(*args,**kwargs)
- return Callee
-
+ names = name.split('.')
+ obj = _PySrv.plcobj
+ while names: obj = getattr(obj, names.pop(0))
+ return obj
class WampSession(wamp.ApplicationSession):
@@ -43,7 +43,7 @@
ID = self.config.extra["ID"]
print 'WAMP session joined by :', ID
for name in ExposedCalls:
- reg = yield self.register(MakeCallee(name), '.'.join((ID,name)))
+ reg = yield self.register(GetCallee(name), '.'.join((ID,name)))
def onLeave(self, details):
global _WampSession