Skip to content

Commit 5beaebc

Browse files
committed
catch one crash
1 parent c3b74ae commit 5beaebc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

codeflash/discovery/functions_to_optimize.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ def get_all_replay_test_functions(
288288
function = function_name
289289
file_path_parts = module_path_parts
290290
file_path = Path(project_root_path, *file_path_parts).with_suffix(".py")
291+
if not file_path.exists():
292+
print(f"{file_path} does not exist")
293+
continue
291294
file_to_functions_map[file_path].append((function, function_name, class_name))
292295
for file_path, functions in file_to_functions_map.items():
293296
all_valid_functions: dict[Path, list[FunctionToOptimize]] = find_all_functions_in_file(file_path=file_path)

0 commit comments

Comments
 (0)