mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +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:
|
||||
# Check whether path is whitelisted in configuration.yaml
|
||||
if self.is_allowed_path(local_path):
|
||||
with open(local_path, "rb") as path_handle:
|
||||
return path_handle
|
||||
return open(local_path, "rb") # pylint: disable=consider-using-with
|
||||
_LOGGER.warning("'%s' is not secure to load data from!", local_path)
|
||||
else:
|
||||
_LOGGER.warning("Neither URL nor local path found in params!")
|
||||
|
Loading…
x
Reference in New Issue
Block a user