Beremiz_service.py
branch#2486
changeset 2202 237c1a2de1c8
parent 2200 6417f5b59eff
child 2204 25dafeb98b55
equal deleted inserted replaced
2201:4e511f5aad19 2202:237c1a2de1c8
   618 
   618 
   619     if wampconf is not None:
   619     if wampconf is not None:
   620         try:
   620         try:
   621             _wampconf = WC.LoadWampClientConf(wampconf)
   621             _wampconf = WC.LoadWampClientConf(wampconf)
   622             if _wampconf:
   622             if _wampconf:
   623                 WC.SetServer(pyroserver)
   623                 WC.SetServer(pyroserver, wampconf, wampsecret)
   624                 if _wampconf.get("url", None):  # TODO : test more ?
   624                 if _wampconf.get("url", False) and _wampconf.get("active", False):  # TODO : test more ?
   625                     WC.RegisterWampClient(wampconf, wampsecret)
   625                     WC.RegisterWampClient()
   626                 else:
   626                 else:
   627                     raise Exception(_("WAMP config is incomplete."))
   627                     raise Exception(_("WAMP config is incomplete or active is false."))
   628             else:
   628             else:
   629                 raise Exception(_("WAMP config is missing."))
   629                 raise Exception(_("WAMP config is missing."))
   630         except Exception:
   630         except Exception:
   631             LogMessageAndException(_("WAMP client startup failed. "))
   631             LogMessageAndException(_("WAMP client startup failed. "))
   632 
   632