From fdae11466d9e5237db83e4ccf01300470f86af59 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Wed, 27 Oct 2021 20:34:00 +0000 Subject: [PATCH] L2SS-465: Support get_node([]) to avoid a breaking edge case --- .../tangostationcontrol/clients/opcua_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tangostationcontrol/tangostationcontrol/clients/opcua_client.py b/tangostationcontrol/tangostationcontrol/clients/opcua_client.py index 87d283c25..f0c246a69 100644 --- a/tangostationcontrol/tangostationcontrol/clients/opcua_client.py +++ b/tangostationcontrol/tangostationcontrol/clients/opcua_client.py @@ -136,6 +136,9 @@ class OPCUAConnection(AsyncCommClient): async def get_node(self, path): """ Retrieve an OPC-UA node from either the cache, or the server. """ + if not path: + return self.obj + cache_key = ",".join(path) # lookup in cache -- GitLab