Skip to content

Commit

Permalink
Ticket 380 - Cyclic import with dynamic paths not detected
Browse files Browse the repository at this point in the history
  • Loading branch information
namsonx committed Nov 15, 2024
1 parent 2fc7b76 commit cfc62de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions JsonPreprocessor/CJsonPreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ def __processImportFiles(self, input_data : dict) -> dict:
out_dict[key] = value
if '${' not in value:
if re.match(r'^\[\s*import\s*\]_\d+$', key):
if value in self.lDynamicImports:
raise Exception(f"Cyclic imported json file '{value}'!")
dynamicIpmportIndex = re.search(r'_(\d+)$', key)[1]
self.lDynamicImports[int(dynamicIpmportIndex)-1] = value
currJsonPath = self.jsonPath
Expand Down

0 comments on commit cfc62de

Please sign in to comment.