From 0c2a021280b7500eca0f744d1a9d712fcbfe4cbc Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 16 Sep 2022 11:22:37 +0200 Subject: [PATCH 1/2] Fix an import error when using ansys-grpc-dpf 0.3.0 with Ansys 212 and initializing a support. --- ansys/dpf/core/support.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansys/dpf/core/support.py b/ansys/dpf/core/support.py index 3ec29593a9..ab24591f26 100644 --- a/ansys/dpf/core/support.py +++ b/ansys/dpf/core/support.py @@ -46,6 +46,9 @@ def __init__(self, support, server=None): # step 1: get server self._server = server_module.get_or_create_server(server) + if not self._server.meet_version("3.0"): + return + # step 2: get api self._support_api = self._server.get_api_for_type( capi=support_capi.SupportCAPI, From 8d45856bcf0c2e9f4c989d35867a01cb127bb682 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Fri, 16 Sep 2022 11:55:30 +0200 Subject: [PATCH 2/2] Fix code coverage. --- ansys/dpf/core/support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansys/dpf/core/support.py b/ansys/dpf/core/support.py index ab24591f26..caaf21e3e4 100644 --- a/ansys/dpf/core/support.py +++ b/ansys/dpf/core/support.py @@ -46,7 +46,7 @@ def __init__(self, support, server=None): # step 1: get server self._server = server_module.get_or_create_server(server) - if not self._server.meet_version("3.0"): + if not self._server.meet_version("3.0"): # pragma: no cover return # step 2: get api