From c24c1f41ea5122d233feec47ebf13d5d9351e666 Mon Sep 17 00:00:00 2001 From: Adarnof Date: Sun, 21 Feb 2016 01:09:32 -0500 Subject: [PATCH] Fix null error when joining strings --- notifications/handlers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/notifications/handlers.py b/notifications/handlers.py index 9d11ad69..720ed07c 100644 --- a/notifications/handlers.py +++ b/notifications/handlers.py @@ -13,7 +13,8 @@ class NotificationHandler(logging.Handler): notif.title = "%s [%s:%s]" % (record.levelname, record.funcName, record.lineno) notif.level = str([item[0] for item in Notification.LEVEL_CHOICES if item[1] == record.levelname][0]) message = record.getMessage() - message = message + "\n\n" - message = message + record.exc_text + if record.exc_text: + message = message + "\n\n" + message = message + record.exc_text notif.message = message notif.save()