From ca0c98c913130f5923cb85d3bfcbb22ac0474169 Mon Sep 17 00:00:00 2001 From: echel0n Date: Thu, 18 Dec 2014 13:48:35 -0800 Subject: [PATCH] Added code to check if title present when error report being submitted to GH is present. --- sickbeard/classes.py | 6 ++++-- sickbeard/logger.py | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sickbeard/classes.py b/sickbeard/classes.py index 6b70edce..9e3fcddf 100644 --- a/sickbeard/classes.py +++ b/sickbeard/classes.py @@ -272,7 +272,9 @@ class UIError(): """ def __init__(self, message): - self.title = sys.exc_info()[1].message or None + try:self.title = sys.exc_info()[1].message + except:self.title = None self.message = message self.time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') - self.exc_info = sys.exc_info() or None + try:self.exc_info = sys.exc_info() + except:self.exc_info = None diff --git a/sickbeard/logger.py b/sickbeard/logger.py index 9f9f10c3..f2f0b8a0 100644 --- a/sickbeard/logger.py +++ b/sickbeard/logger.py @@ -157,6 +157,9 @@ class Logger(object): try: for curError in sorted(classes.ErrorViewer.errors, key=lambda error: error.time, reverse=True)[:500]: + if not curError.title: + continue + message = u"### INFO\n" message += u"Python Version: **" + sys.version[:120] + "**\n" message += u"Operating System: **" + platform.platform() + "**\n"