From 283fd9fe4ed3637a5dc4a72f3b0e88539d5b6ee5 Mon Sep 17 00:00:00 2001 From: popcorny Date: Thu, 26 Sep 2024 11:09:15 +0800 Subject: [PATCH] Fix: Cannot launch recce server in file mode when file does not exist Signed-off-by: popcorny --- recce/state.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recce/state.py b/recce/state.py index d5ba7675..70b63386 100644 --- a/recce/state.py +++ b/recce/state.py @@ -121,7 +121,7 @@ def from_file(file_path: str, file_type: SupportedFileTypes = SupportedFileTypes logger.debug(f"Load state file from: '{file_path}'") if not Path(file_path).is_file(): - raise FileNotFoundError(f"State file not found: {file_path}") + return None io = file_io_factory(file_type) json_content = io.read(file_path)