1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fix pathlib resolve (#8311)

* Fix pathlib resolve

* fix test
This commit is contained in:
Pascal Vizeli
2017-07-03 07:24:08 +02:00
committed by GitHub
parent 3a6434f566
commit ee7d4710c4
2 changed files with 3 additions and 3 deletions

View File

@@ -1079,7 +1079,7 @@ class Config(object):
"""Check if the path is valid for access from outside."""
parent = pathlib.Path(path).parent
try:
parent.resolve() # pylint: disable=no-member
parent = parent.resolve() # pylint: disable=no-member
except (FileNotFoundError, RuntimeError, PermissionError):
return False