@@ -665,11 +665,11 @@ def __init__(self,
665
665
self .live = True
666
666
self ._create_shutdown_funcs ()
667
667
self ._check_first_call (num_connection_tryouts )
668
+ self .set_as_global (as_global = as_global )
668
669
try :
669
670
self .apply_context (context )
670
671
except errors .DpfVersionNotSupported :
671
672
pass
672
- self .set_as_global (as_global = as_global )
673
673
674
674
def _check_first_call (self , num_connection_tryouts ):
675
675
for i in range (num_connection_tryouts ):
@@ -832,6 +832,7 @@ def __init__(self,
832
832
f"DPF directory not found at { os .path .dirname (path )} "
833
833
f"Unable to locate the following file: { path } " )
834
834
raise e
835
+ self .set_as_global (as_global = as_global )
835
836
try :
836
837
self .apply_context (context )
837
838
except errors .DpfVersionNotSupported :
@@ -840,7 +841,6 @@ def __init__(self,
840
841
)
841
842
self ._context = server_context .AvailableServerContexts .premium
842
843
pass
843
- self .set_as_global (as_global = as_global )
844
844
845
845
@property
846
846
def version (self ):
@@ -980,11 +980,11 @@ def __init__(
980
980
self ._create_shutdown_funcs ()
981
981
982
982
check_ansys_grpc_dpf_version (self , timeout )
983
+ self .set_as_global (as_global = as_global )
983
984
try :
984
985
self .apply_context (context )
985
986
except errors .DpfVersionNotSupported :
986
987
pass
987
- self .set_as_global (as_global = as_global )
988
988
989
989
def _create_shutdown_funcs (self ):
990
990
self ._core_api = data_processing_grpcapi .DataProcessingGRPCAPI
0 commit comments