1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Added code to check if title present when error report being submitted to GH is present.

This commit is contained in:
echel0n 2014-12-18 13:48:35 -08:00
parent 422f0935d8
commit ca0c98c913
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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"