We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64bc0db commit 265d45cCopy full SHA for 265d45c
checksec/__main__.py
@@ -30,11 +30,14 @@
30
def walk_filepath_list(filepath_list: List[Path], recursive: bool = False) -> Iterator[Path]:
31
for path in filepath_list:
32
if path.is_dir() and not path.is_symlink():
33
- if recursive:
34
- for f in os.scandir(path):
35
- yield from walk_filepath_list([Path(f)], recursive)
36
- else:
37
- yield from (Path(f) for f in os.scandir(path))
+ try:
+ if recursive:
+ for f in os.scandir(path):
+ yield from walk_filepath_list([Path(f)], recursive)
+ else:
38
+ yield from (Path(f) for f in os.scandir(path))
39
+ except OSError:
40
+ continue
41
elif path.is_file():
42
yield path
43
0 commit comments