Browse Source

updated details in pushbullet logging

pull/8/head
Chris Caron 7 years ago
parent
commit
70bdb947de
  1. 16
      apprise/plugins/NotifyPushBullet.py

16
apprise/plugins/NotifyPushBullet.py

@ -128,29 +128,35 @@ class NotifyPushBullet(NotifyBase):
auth=auth,
verify=self.verify_certificate,
)
if r.status_code != requests.codes.ok:
# We had a problem
try:
self.logger.warning(
'Failed to send PushBullet notification: '
'%s (error=%s).' % (
'Failed to send PushBullet notification to '
'"%s": %s (error=%s).' % (
recipient,
PUSHBULLET_HTTP_ERROR_MAP[r.status_code],
r.status_code))
except KeyError:
self.logger.warning(
'Failed to send PushBullet notification '
'(error=%s).' % r.status_code)
'Failed to send PushBullet notification to '
'"%s" (error=%s).' % (recipient, r.status_code))
# self.logger.debug('Response Details: %s' % r.raw.read())
# Return; we're done
has_error = True
else:
self.logger.info(
'Sent PushBullet notification to "%s".' % (recipient))
except requests.RequestException as e:
self.logger.warning(
'A Connection error occured sending PushBullet '
'notification.'
'notification to "%s".' % (recipient),
)
self.logger.debug('Socket Exception: %s' % str(e))
has_error = True

Loading…
Cancel
Save