diff --git a/src/ansys/dpf/core/server_types.py b/src/ansys/dpf/core/server_types.py index a1493f7116..8bf6a505c0 100644 --- a/src/ansys/dpf/core/server_types.py +++ b/src/ansys/dpf/core/server_types.py @@ -1100,7 +1100,7 @@ def get_api_for_type(self, capi, grpcapi): return grpcapi def create_stub_if_necessary(self, stub_name, stub_type): - if self.channel and not (stub_name in self._stubs.keys()): + if self.channel and not stub_name in self._stubs: self._stubs[stub_name] = stub_type(self.channel) def get_stub(self, stub_name): diff --git a/src/ansys/dpf/core/settings.py b/src/ansys/dpf/core/settings.py index b562164fcf..63497ef301 100644 --- a/src/ansys/dpf/core/settings.py +++ b/src/ansys/dpf/core/settings.py @@ -126,9 +126,9 @@ def get_runtime_client_config(server=None): """ from ansys.dpf.core.runtime_config import RuntimeClientConfig - from ansys.dpf import core + from ansys.dpf import core as root if server is None: - server = core.SERVER + server = root.SERVER if server is not None and server.has_client(): _api = server.get_api_for_type( capi=data_processing_capi.DataProcessingCAPI,