Beremiz_service.py
branch#2486
changeset 2200 6417f5b59eff
parent 1955 a1ea9856013a
child 2202 237c1a2de1c8
equal deleted inserted replaced
2199:8fd73c6c8aa9 2200:6417f5b59eff
   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                 if _wampconf["url"]:  # TODO : test more ?
   623                 WC.SetServer(pyroserver)
       
   624                 if _wampconf.get("url", None):  # TODO : test more ?
   624                     WC.RegisterWampClient(wampconf, wampsecret)
   625                     WC.RegisterWampClient(wampconf, wampsecret)
   625                     pyruntimevars["wampsession"] = WC.GetSession
       
   626                     WC.SetServer(pyroserver)
       
   627                 else:
   626                 else:
   628                     raise Exception(_("WAMP config is incomplete."))
   627                     raise Exception(_("WAMP config is incomplete."))
   629             else:
   628             else:
   630                 raise Exception(_("WAMP config is missing."))
   629                 raise Exception(_("WAMP config is missing."))
   631         except Exception:
   630         except Exception: