mirror of
https://github.com/caronc/apprise.git
synced 2025-01-30 09:49:20 +01:00
fix(pushover): ignore unsupported attachments as intended instead of discarding the entire notification (#650)
This commit is contained in:
parent
f1990b14ce
commit
e9f040a2d0
@ -432,24 +432,25 @@ class NotifyPushover(NotifyBase):
|
||||
attach.mimetype,
|
||||
attach.url(privacy=True)))
|
||||
|
||||
return True
|
||||
attach = None
|
||||
|
||||
# If we get here, we're dealing with a supported image.
|
||||
# Verify that the filesize is okay though.
|
||||
file_size = len(attach)
|
||||
if not (file_size > 0
|
||||
and file_size <= self.attach_max_size_bytes):
|
||||
else:
|
||||
# If we get here, we're dealing with a supported image.
|
||||
# Verify that the filesize is okay though.
|
||||
file_size = len(attach)
|
||||
if not (file_size > 0
|
||||
and file_size <= self.attach_max_size_bytes):
|
||||
|
||||
# File size is no good
|
||||
self.logger.warning(
|
||||
'Pushover attachment size ({}B) exceeds limit: {}'
|
||||
.format(file_size, attach.url(privacy=True)))
|
||||
# File size is no good
|
||||
self.logger.warning(
|
||||
'Pushover attachment size ({}B) exceeds limit: {}'
|
||||
.format(file_size, attach.url(privacy=True)))
|
||||
|
||||
return False
|
||||
return False
|
||||
|
||||
self.logger.debug(
|
||||
'Posting Pushover attachment {}'.format(
|
||||
attach.url(privacy=True)))
|
||||
self.logger.debug(
|
||||
'Posting Pushover attachment {}'.format(
|
||||
attach.url(privacy=True)))
|
||||
|
||||
# Default Header
|
||||
headers = {
|
||||
|
Loading…
Reference in New Issue
Block a user