Beremiz_service.py
branchnevow_service_rework
changeset 2212 cf1718962567
parent 2211 46447d99e5f9
child 2213 73b7034693b9
equal deleted inserted replaced
2211:46447d99e5f9 2212:cf1718962567
   621         except Exception:
   621         except Exception:
   622             LogMessageAndException(_("Nevow Web service failed. "))
   622             LogMessageAndException(_("Nevow Web service failed. "))
   623 
   623 
   624     if wampconf is not None:
   624     if wampconf is not None:
   625         try:
   625         try:
   626             WC.SetServer(pyroserver, wampconf, wampsecret)
   626             WC.SetServer(pyroserver)
   627             _wampconf = WC.GetConfiguration()
   627             WC.RegisterWampClient(wampconf, wampsecret)
   628             if _wampconf:
       
   629                 if _wampconf.get("url", False) and _wampconf.get("active", False):  # TODO : test more ?
       
   630                     WC.RegisterWampClient()
       
   631                 else:
       
   632                     raise Exception(_("WAMP config is incomplete or active is false."))
       
   633             else:
       
   634                 raise Exception(_("WAMP config is missing."))
       
   635         except Exception:
   628         except Exception:
   636             LogMessageAndException(_("WAMP client startup failed. "))
   629             LogMessageAndException(_("WAMP client startup failed. "))
   637 
   630 
   638 pyro_thread_started = Lock()
   631 pyro_thread_started = Lock()
   639 pyro_thread_started.acquire()
   632 pyro_thread_started.acquire()