Use string formatting so that the CalledProcessError doesn't cause a TypeError when output is None

This commit is contained in:
Brandon Konkle 2013-07-31 10:00:56 -05:00
parent 4de4cba25f
commit f3eea00cb4

View file

@ -82,7 +82,7 @@ class Task(object):
output, err = process.communicate()
retcode = process.poll()
if retcode not in [0, 2]: # normal jshint return codes
raise CalledProcessError(retcode, cmd, output=output + '\n' + err)
raise CalledProcessError(retcode, cmd, output='%s\n%s' % (output, err))
self.output.write(output.decode('utf-8'))