mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix file path error in nfandroidtv (#53814)
This commit is contained in:
parent
673be4f7dd
commit
822e8645eb
@ -201,8 +201,7 @@ class NFAndroidTVNotificationService(BaseNotificationService):
|
|||||||
if local_path is not None:
|
if local_path is not None:
|
||||||
# Check whether path is whitelisted in configuration.yaml
|
# Check whether path is whitelisted in configuration.yaml
|
||||||
if self.is_allowed_path(local_path):
|
if self.is_allowed_path(local_path):
|
||||||
with open(local_path, "rb") as path_handle:
|
return open(local_path, "rb") # pylint: disable=consider-using-with
|
||||||
return path_handle
|
|
||||||
_LOGGER.warning("'%s' is not secure to load data from!", local_path)
|
_LOGGER.warning("'%s' is not secure to load data from!", local_path)
|
||||||
else:
|
else:
|
||||||
_LOGGER.warning("Neither URL nor local path found in params!")
|
_LOGGER.warning("Neither URL nor local path found in params!")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user