mirror of
https://github.com/p2p-ld/numpydantic.git
synced 2024-11-14 18:54:28 +00:00
indexerror finding filesystem root
This commit is contained in:
parent
5a7e2e2389
commit
fe2dbdcd58
1 changed files with 5 additions and 1 deletions
|
@ -82,7 +82,11 @@ def test_relative_to_root_dir():
|
||||||
beneath the root directory (eg `/data`) even if they exist
|
beneath the root directory (eg `/data`) even if they exist
|
||||||
|
|
||||||
"""
|
"""
|
||||||
root = Path().resolve().parents[-1]
|
try:
|
||||||
|
root = Path().resolve().parents[-1]
|
||||||
|
except IndexError:
|
||||||
|
root = Path("/").resolve()
|
||||||
|
|
||||||
test_path = None
|
test_path = None
|
||||||
for path in root.iterdir():
|
for path in root.iterdir():
|
||||||
if path.is_dir():
|
if path.is_dir():
|
||||||
|
|
Loading…
Reference in a new issue