You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# expression parsing is currently a bit limited, we only replace {$1} to {$N} and {$index}
93
+
ifpart[1] !='$':
94
+
raiseInvalidOutputPath("Only simple substitutions are currently supported (like 'abc.{$2}.{$index}.def') - was expecting '$' after '{'.")
95
+
expression=part[2:-1]
96
+
ifexpression=='index':
97
+
result_parts.append(oid_index)
98
+
else:
99
+
ifnotexpression.isdigit():
100
+
raiseInvalidOutputPath("Only simple substitutions are currently supported (like 'abc.{$2}.{$index}.def') - was expecting either 'index' or a number after '$'.")
101
+
i=int(expression) -1
102
+
ifnot0<=i<len(addressable_results):
103
+
raiseInvalidOutputPath(f"Could not create output path - the number after '$' should be between 1 and {len(addressable_results)} inclusive.")
raiseInvalidOutputPath("The same path was already constructed from a previous result, please include {$index} in the output path template, or make sure it is unique!")
148
+
known_output_paths.add(output_path)
104
149
result.append({
105
-
'p': f'{output_path}.{oid_index}',
150
+
'p': output_path,
106
151
'v': value,
107
152
})
108
153
exceptNoValueForOid:
109
154
log.warning(f'Missing value for oid index: {oid_index}')
155
+
exceptInvalidOutputPathasex:
156
+
log.warning(f'Invalid output path for oid index [{oid_index}]: {str(ex)}')
0 commit comments