Skip to content
Snippets Groups Projects

L2SS-627: Update minimal python version

Merged Corné Lukken requested to merge L2SS-627 into master
Files
12
@@ -184,7 +184,9 @@ class OPCUAConnection(AsyncCommClient):
# NOTE: debug statement tries to get the qualified name, this may not always work. in that case forgo the name and just print the path
node_name = str(node.get_browse_name())[len("QualifiedName(2:"):]
logger.debug("connected OPC ua node {} of type {} to attribute with dimensions: {} x {} ".format(str(node_name)[:len(node_name)-1], str(ua_type)[len("VariantType."):], dim_x, dim_y))
except:
except Exception:
"B001 Do not use bare `except:`, it also catches unexpected events"
"like memory errors, interrupts, system exit"
pass
return prot_attr
@@ -214,11 +216,10 @@ class OPCUAConnection(AsyncCommClient):
node = await self.get_node(method_path[:-1])
result = await node.call_method(method_path[-1], *args)
except Exception as e:
raise Exception(f"Calling method {method_path} failed") from e
raise RuntimeError(f"Calling method {method_path} failed") from e
return result
def call_method(self, method_path, *args):
return asyncio.run_coroutine_threadsafe(self._call_method(method_path, *args), self.event_loop).result()
Loading