"vscode:/vscode.git/clone" did not exist on "a9940fe4b2b63bd82a2f853616e00fd0bd112f9a"
Commit 7d771d1d authored by Tom Aarsen's avatar Tom Aarsen
Browse files

Catch OSError with specific error number

parent a58cc5a1
...@@ -18,8 +18,9 @@ def remove_non_existent_dirs(candidate_paths: Set[Path]) -> Set[Path]: ...@@ -18,8 +18,9 @@ def remove_non_existent_dirs(candidate_paths: Set[Path]) -> Set[Path]:
try: try:
if path.exists(): if path.exists():
existent_directories.add(path) existent_directories.add(path)
except errno.ENAMETOOLONG: except OSError as exc:
pass if exc.errno != errno.ENAMETOOLONG:
raise exc
non_existent_directories: Set[Path] = candidate_paths - existent_directories non_existent_directories: Set[Path] = candidate_paths - existent_directories
if non_existent_directories: if non_existent_directories:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment