@@ -651,11 +651,11 @@ def __init__(self,
651
651
self .live = True
652
652
self ._create_shutdown_funcs ()
653
653
self ._check_first_call (num_connection_tryouts )
654
- self .set_as_global (as_global = as_global )
655
654
try :
656
655
self .apply_context (server_context .SERVER_CONTEXT )
657
656
except errors .DpfVersionNotSupported :
658
657
pass
658
+ self .set_as_global (as_global = as_global )
659
659
660
660
def _check_first_call (self , num_connection_tryouts ):
661
661
for i in range (num_connection_tryouts ):
@@ -816,7 +816,6 @@ def __init__(self,
816
816
f"DPF directory not found at { os .path .dirname (path )} "
817
817
f"Unable to locate the following file: { path } " )
818
818
raise e
819
- self .set_as_global (as_global = as_global )
820
819
try :
821
820
self .apply_context (server_context .SERVER_CONTEXT )
822
821
except errors .DpfVersionNotSupported :
@@ -825,6 +824,7 @@ def __init__(self,
825
824
)
826
825
self ._context = server_context .AvailableServerContexts .premium
827
826
pass
827
+ self .set_as_global (as_global = as_global )
828
828
829
829
@property
830
830
def version (self ):
@@ -963,11 +963,11 @@ def __init__(
963
963
self ._create_shutdown_funcs ()
964
964
965
965
check_ansys_grpc_dpf_version (self , timeout )
966
- self .set_as_global (as_global = as_global )
967
966
try :
968
967
self .apply_context (server_context .SERVER_CONTEXT )
969
968
except errors .DpfVersionNotSupported :
970
969
pass
970
+ self .set_as_global (as_global = as_global )
971
971
972
972
def _create_shutdown_funcs (self ):
973
973
self ._core_api = data_processing_grpcapi .DataProcessingGRPCAPI
0 commit comments