From bafc492c45b9f42559aedc794fda268ab44b517c Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Tue, 20 Sep 2016 12:53:06 -0500 Subject: [PATCH] Always log exception for DesktopNotification failure Also remove unused ``exc`` variable. --- i3pystatus/core/desktop.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/i3pystatus/core/desktop.py b/i3pystatus/core/desktop.py index 24dd200..d01161f 100644 --- a/i3pystatus/core/desktop.py +++ b/i3pystatus/core/desktop.py @@ -68,10 +68,9 @@ else: notification.set_urgency(self.URGENCY_LUT[self.urgency]) try: return notification.show() - except Exception as exc: - self.logger.error( + except Exception: + self.logger.exception( 'Failed to display desktop notification (is a ' - 'notification daemon running?)', - exc_info=self.log_level <= logging.DEBUG + 'notification daemon running?)' ) return False