Print the failing command if subprocess.call() fails

Change-Id: Ib640b590e259a1a9bd44030ae13611cd359721e0
This commit is contained in:
Rintaro Kuroiwa 2017-04-18 16:33:35 -07:00
parent d320e245bb
commit 9d101f85e3
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ class PackagerApp(object):
# Put single-quotes around each entry so that things like '$' signs in
# segment templates won't be interpreted as shell variables.
self.packaging_command_line = ' '.join(["'%s'" % entry for entry in cmd])
assert 0 == subprocess.call(cmd)
assert 0 == subprocess.call(cmd), ('%s returned non-0 status' %
self.packaging_command_line)
def GetCommandLine(self):
return self.packaging_command_line