* fix issue #8948 in pushbullet * pushbullet
This commit is contained in:
parent
4b3a932d88
commit
74adebc2fd
1 changed files with 2 additions and 2 deletions
|
@ -91,7 +91,7 @@ class PushBulletNotificationService(BaseNotificationService):
|
|||
# Backward compatibility, notify all devices in own account
|
||||
if url:
|
||||
self.pushbullet.push_link(title, url, body=message)
|
||||
if self.hass.config.is_allowed_path(filepath):
|
||||
if filepath and self.hass.config.is_allowed_path(filepath):
|
||||
with open(filepath, "rb") as fileh:
|
||||
filedata = self.pushbullet.upload_file(fileh, filepath)
|
||||
self.pushbullet.push_file(title=title, body=message,
|
||||
|
@ -115,7 +115,7 @@ class PushBulletNotificationService(BaseNotificationService):
|
|||
if url:
|
||||
self.pushbullet.push_link(
|
||||
title, url, body=message, email=tname)
|
||||
if self.hass.config.is_allowed_path(filepath):
|
||||
if filepath and self.hass.config.is_allowed_path(filepath):
|
||||
with open(filepath, "rb") as fileh:
|
||||
filedata = self.pushbullet.upload_file(fileh, filepath)
|
||||
self.pushbullet.push_file(title=title, body=message,
|
||||
|
|
Loading…
Add table
Reference in a new issue