Merge pull request #1233 from abeloin/patch-github_submit

Fix GitHub submit error
This commit is contained in:
Alexandre Beloin 2015-02-15 18:16:45 -05:00
commit a8de735cdd
1 changed files with 4 additions and 3 deletions

View File

@ -171,8 +171,9 @@ class Logger(object):
if match:
level = match.group(2)
if reverseNames[level] == ERROR:
paste_data = "".join(log_data[i:50])
gist = gh.get_user().create_gist(True, {"sickrage.log": InputFileContent(paste_data)})
paste_data = "".join(log_data[i:i+50])
if paste_data:
gist = gh.get_user().create_gist(True, {"sickrage.log": InputFileContent(paste_data)})
break
message = u"### INFO\n"
@ -189,7 +190,7 @@ class Logger(object):
message += u"---\n"
message += u"_STAFF NOTIFIED_: @SiCKRAGETV/owners @SiCKRAGETV/moderators"
issue = gh.get_organization(gh_org).get_repo(gh_repo).create_issue("[APP SUBMITTED]: " + curError.title, message)
issue = gh.get_organization(gh_org).get_repo(gh_repo).create_issue("[APP SUBMITTED]: " + str(curError.title), message)
if issue:
self.log('Your issue ticket #%s was submitted successfully!' % issue.number)