opc_ua/client.py
branchwxPython4
changeset 3678 6c496a8ed2a9
parent 3674 d10a7907fb43
child 3718 7841b651d601
equal deleted inserted replaced
3677:6d9040e07c32 3678:6c496a8ed2a9
    99 
    99 
   100     def GetModelData(self):
   100     def GetModelData(self):
   101         return self.modeldata
   101         return self.modeldata
   102 
   102 
   103     def GetConfig(self):
   103     def GetConfig(self):
   104         cfg = lambda path: self.GetParamsAttributes("OPCUAClient."+path)["value"]
   104         def cfg(path): 
       
   105             try:
       
   106                 attr=self.GetParamsAttributes("OPCUAClient."+path)
       
   107             except ValueError:
       
   108                 return None
       
   109             return attr["value"]
       
   110 
   105         AuthType = cfg("AuthType")
   111         AuthType = cfg("AuthType")
   106         res = dict(URI=cfg("Server_URI"), AuthType=AuthType)
   112         res = dict(URI=cfg("Server_URI"), AuthType=AuthType)
   107 
   113 
   108         paramList = authParams.get(AuthType, None)
   114         paramList = authParams.get(AuthType, None)
   109         if paramList:
   115         if paramList: