opc_ua/client.py
branchwxPython4
changeset 3678 6c496a8ed2a9
parent 3674 d10a7907fb43
child 3718 7841b651d601
--- a/opc_ua/client.py	Tue Nov 15 20:43:39 2022 +0100
+++ b/opc_ua/client.py	Fri Nov 18 07:34:29 2022 +0100
@@ -101,7 +101,13 @@
         return self.modeldata
 
     def GetConfig(self):
-        cfg = lambda path: self.GetParamsAttributes("OPCUAClient."+path)["value"]
+        def cfg(path): 
+            try:
+                attr=self.GetParamsAttributes("OPCUAClient."+path)
+            except ValueError:
+                return None
+            return attr["value"]
+
         AuthType = cfg("AuthType")
         res = dict(URI=cfg("Server_URI"), AuthType=AuthType)