File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/ansys/dpf/core/operators Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Autogenerated DPF operator classes.
77from __future__ import annotations
88
99from warnings import warn
10+ from ansys.dpf.core.core import errors
1011from ansys.dpf.core.dpf_operator import Operator
1112from ansys.dpf.core.inputs import Input, _Inputs
1213{ {#outputs} }
@@ -89,8 +90,11 @@ class {{class_name}}(Operator):
8990 { {#has_internal_name_alias} }
9091 try:
9192 super().__init__(name="{ {operator_name} }", config=config, server=server)
92- except KeyError as e:
93- super().__init__(name="{ {internal_name_alias} }", config=config, server=server)
93+ except (KeyError, errors.DPFServerException) as e:
94+ if "doesn't exist in the registry" in str(e):
95+ super().__init__(name="{ {internal_name_alias} }", config=config, server=server)
96+ else:
97+ raise e
9498 { {/has_internal_name_alias} }
9599 self._inputs = Inputs{ {capital_class_name} }(self)
96100 self._outputs = Outputs{ {capital_class_name} }(self)
You can’t perform that action at this time.
0 commit comments