Skip to content

Commit 1814b93

Browse files
committed
cast to list to catch OSError
1 parent e053f3a commit 1814b93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_core/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def list_subcommands() -> list[str]:
9292
# construct a set of `('foo', 'bar') from `jupyter-foo-bar`
9393
for d in _path_with_self():
9494
try:
95-
bin_paths = Path(d).iterdir()
95+
bin_paths = list(Path(d).iterdir())
9696
except OSError:
9797
continue
9898
for path in bin_paths:

0 commit comments

Comments
 (0)