Skip to content

Commit f234a04

Browse files
committed
just catch all exceptions here
1 parent 86e2570 commit f234a04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codeflash/code_utils/concolic_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ def __init__(self) -> None:
7070

7171
def clean_concolic_tests(test_suite_code: str) -> str:
7272
try:
73-
can_parse = True
7473
tree = ast.parse(test_suite_code)
75-
except SyntaxError:
74+
can_parse = True
75+
except Exception:
7676
can_parse = False
77+
tree = None
7778

7879
if not can_parse:
7980
return AssertCleanup().transform_asserts(test_suite_code)
@@ -87,7 +88,6 @@ def clean_concolic_tests(test_suite_code: str) -> str:
8788
new_body.append(ast.Expr(value=stmt.test.left))
8889
else:
8990
new_body.append(stmt)
90-
9191
else:
9292
new_body.append(stmt)
9393
node.body = new_body

0 commit comments

Comments
 (0)