Beremiz_service.py
branch#2486
changeset 2202 237c1a2de1c8
parent 2200 6417f5b59eff
child 2204 25dafeb98b55
--- a/Beremiz_service.py	Wed Apr 18 10:42:33 2018 +0200
+++ b/Beremiz_service.py	Thu Apr 19 13:40:56 2018 +0200
@@ -620,11 +620,11 @@
         try:
             _wampconf = WC.LoadWampClientConf(wampconf)
             if _wampconf:
-                WC.SetServer(pyroserver)
-                if _wampconf.get("url", None):  # TODO : test more ?
-                    WC.RegisterWampClient(wampconf, wampsecret)
+                WC.SetServer(pyroserver, wampconf, wampsecret)
+                if _wampconf.get("url", False) and _wampconf.get("active", False):  # TODO : test more ?
+                    WC.RegisterWampClient()
                 else:
-                    raise Exception(_("WAMP config is incomplete."))
+                    raise Exception(_("WAMP config is incomplete or active is false."))
             else:
                 raise Exception(_("WAMP config is missing."))
         except Exception: