From 09692ebcea737d971c0b4dee7f9d29b6994d9fff Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Wed, 29 Jul 2015 23:43:50 -0400 Subject: [PATCH] added more debugging information around sent notification; refs #2 --- Notify/pnotify/NotifyGrowl.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Notify/pnotify/NotifyGrowl.py b/Notify/pnotify/NotifyGrowl.py index 24f7b2e..4770077 100644 --- a/Notify/pnotify/NotifyGrowl.py +++ b/Notify/pnotify/NotifyGrowl.py @@ -153,11 +153,17 @@ def _notify(self, title, body, notify_type, **kwargs): payload['icon'] = icon try: - self.growl.notify(**payload) + response = self.growl.notify(**payload) + if not isinstance(response, bool): + self.logger.warning( + 'Growl notification failed to send with response: %s' % \ + str(response), + ) - self.logger.debug( - 'Growl notification sent successfully.' - ) + else: + self.logger.debug( + 'Growl notification sent successfully.' + ) except GrowlNetworkError as e: # Since Growl servers listen for UDP broadcasts,