mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 04:15:11 +00:00
Merge pull request #1183 from diegobonato/fix/handle-oserror-in-project-path-validation
Handle OSError when validating registered project paths on startup
This commit is contained in:
1 file changed
+6
-1
@@ -826,7 +826,12 @@ class SerenaConfig(SharedConfig):
|
||||
instance.projects = []
|
||||
for path in loaded_commented_yaml["projects"]:
|
||||
path = Path(path).resolve()
|
||||
if not path.exists() or (path.is_dir() and not os.path.isfile(instance.get_project_yml_location(str(path)))):
|
||||
try:
|
||||
path_exists = path.exists()
|
||||
except OSError as e:
|
||||
log.warning(f"Project path {path} is not accessible ({e}), skipping.")
|
||||
continue
|
||||
if not path_exists or (path.is_dir() and not os.path.isfile(instance.get_project_yml_location(str(path)))):
|
||||
log.warning(f"Project path {path} does not exist or no associated project configuration file found, skipping.")
|
||||
continue
|
||||
if path.is_file():
|
||||
|
||||
Reference in new issue
Block a user