runtime/WampClient.py
changeset 1894 f224383cc883
parent 1893 971de876b1af
child 1898 d2dbdeffc426
--- a/runtime/WampClient.py	Tue Jan 09 15:08:08 2018 +0100
+++ b/runtime/WampClient.py	Wed Jan 10 13:21:42 2018 +0100
@@ -70,8 +70,7 @@
 
 class WampSession(wamp.ApplicationSession):
     def onConnect(self):
-        secret = self.config.extra["secret"]
-        if secret:
+        if self.config.extra.has_key("secret"):
             user = self.config.extra["ID"].encode('utf8')
             self.join(u"Automation", [u"wampcra"], user)
         else:
@@ -143,7 +142,7 @@
     WSClientConf = LoadWampClientConf(wampconf)
 
     if not WSClientConf:
-        print _("WAMP client connection not established!")
+        print(_("WAMP client connection not established!"))
         return
 
     WampSecret = LoadWampSecret(secretfname)
@@ -164,7 +163,7 @@
 
     # start the client from a Twisted endpoint
     conn = connectWS(transport_factory)
-    print(_("WAMP client connecting to :"), _WSClientConf["url"])
+    print(_("WAMP client connecting to :"), WSClientConf["url"])
     return conn