1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-15 13:55:05 -05:00

Fixes crash on general settings page when git output is none

This commit is contained in:
Adam 2014-10-12 17:28:58 +08:00
parent 5aae8d7b48
commit d5daa14dc0

View File

@ -378,7 +378,7 @@ class GitUpdateManager(UpdateManager):
if output:
output = output.strip()
logger.log(u"git output: " + output, logger.DEBUG)
logger.log(u"git output: " + str(output), logger.DEBUG)
except OSError:
logger.log(u"Command " + cmd + " didn't work")
@ -389,15 +389,15 @@ class GitUpdateManager(UpdateManager):
exit_status = 0
elif exit_status == 1:
logger.log(cmd + u" returned : " + output, logger.ERROR)
logger.log(cmd + u" returned : " + str(output), logger.ERROR)
exit_status = 1
elif exit_status == 128 or 'fatal:' in output or err:
logger.log(cmd + u" returned : " + output, logger.ERROR)
logger.log(cmd + u" returned : " + str(output), logger.ERROR)
exit_status = 128
else:
logger.log(cmd + u" returned : " + output + u", treat as error for now", logger.ERROR)
logger.log(cmd + u" returned : " + str(output) + u", treat as error for now", logger.ERROR)
exit_status = 1
return (output, err, exit_status)