From c025371c1b2daae86b8b32bc9ca3bf2c07fb43c5 Mon Sep 17 00:00:00 2001 From: Rinaldus Date: Thu, 16 Nov 2017 15:40:12 +0300 Subject: [PATCH] Fixed program crash if OS doesn't support baloon notification --- mail-notifier.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mail-notifier.py b/mail-notifier.py index 5089962..d1dd7b6 100755 --- a/mail-notifier.py +++ b/mail-notifier.py @@ -440,10 +440,14 @@ def mail_check(): # check was successfull, lastCheckCount is updating window.lastCheckCount = mail_count def notify(message): - if settings.value("Notify"): - n = notify2.Notification(programTitle, message) - n.show() - return + try: + if settings.value("Notify"): + n = notify2.Notification(programTitle, message) + n.show() + return + except: + print(message) + pass