Catch exceptions raised when resolving plot directories (#13786)
* plotting: Catch exceptions raised when resolving plot directories * `try/except/else` -> `try/except/continue`
This commit is contained in:
parent
15111cf196
commit
978c3708aa
1 changed files with 5 additions and 1 deletions
|
@ -78,7 +78,11 @@ def get_plot_filenames(root_path: Path) -> Dict[Path, List[Path]]:
|
|||
config = load_config(root_path, "config.yaml")
|
||||
recursive_scan: bool = config["harvester"].get("recursive_plot_scan", False)
|
||||
for directory_name in get_plot_directories(root_path, config):
|
||||
try:
|
||||
directory = Path(directory_name).resolve()
|
||||
except (OSError, RuntimeError):
|
||||
log.exception(f"Failed to resolve {directory_name}")
|
||||
continue
|
||||
all_files[directory] = get_filenames(directory, recursive_scan)
|
||||
return all_files
|
||||
|
||||
|
|
Loading…
Reference in a new issue