Skip to content

Commit ae5c6a2

Browse files
committed
Handle errors in fetching config_specification
1 parent 73b6e77 commit ae5c6a2

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.ci/generate_operators_doc.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,19 @@ def fetch_doc_info(server, operator_name):
5757
"optional": output.optional,
5858
}
5959
)
60-
for configuration_key in spec.config_specification:
61-
configuration = spec.config_specification[configuration_key]
62-
configurations_info.append(
63-
{
64-
"name": configuration.name,
65-
"types": [str(t) for t in configuration.type_names],
66-
"document": configuration.document,
67-
"default_value": configuration.default_value_str,
68-
}
69-
)
60+
try:
61+
for configuration_key in spec.config_specification:
62+
configuration = spec.config_specification[configuration_key]
63+
configurations_info.append(
64+
{
65+
"name": configuration.name,
66+
"types": [str(t) for t in configuration.type_names],
67+
"document": configuration.document,
68+
"default_value": configuration.default_value_str,
69+
}
70+
)
71+
except:
72+
print(f"Operator {operator_name} - error in fetching configuration info!")
7073
properties = spec.properties
7174
plugin = properties.pop("plugin", "N/A")
7275

@@ -85,6 +88,8 @@ def fetch_doc_info(server, operator_name):
8588
op_friendly_name = category + ":" + op_friendly_name
8689

8790
license = properties.pop("license", "None")
91+
92+
exposure = properties.pop("exposure", "N/A")
8893
scripting_info = {
8994
"category": category,
9095
"plugin": plugin,
@@ -100,7 +105,7 @@ def fetch_doc_info(server, operator_name):
100105
"outputs": output_info,
101106
"configurations": configurations_info,
102107
"scripting_info": scripting_info,
103-
"exposure": properties["exposure"],
108+
"exposure": exposure,
104109
}
105110

106111

0 commit comments

Comments
 (0)