mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-06 13:17:44 +03:00
ukify: Handle directories in path_is_readable()
This commit is contained in:
parent
8d885b4477
commit
737dab1a8d
@ -69,7 +69,10 @@ def path_is_readable(s: str | None) -> pathlib.Path | None:
|
||||
if s is None:
|
||||
return None
|
||||
p = pathlib.Path(s)
|
||||
p.open().close()
|
||||
try:
|
||||
p.open().close()
|
||||
except IsADirectoryError:
|
||||
pass
|
||||
return p
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user