OSDN Git Service

Show complete command with args when ComputePatch fails
authorSteadyQuad <SteadyQuad@gmail.com>
Tue, 4 Oct 2016 09:36:18 +0000 (11:36 +0200)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Wed, 5 Oct 2016 09:06:42 +0000 (02:06 -0700)
When Difference.ComputePatch() failed for some reason, only
the first part of the failed command was show with the error,
not all arguments.

old (simplified):
WARNING: failure running ['imgdiff', '-b', '/tmp/recovery-resource.dat']:

new:
WARNING: failure running ['imgdiff', '-b', '/tmp/recovery-resource.dat',
  '/tmp/tmpSsy_kf', '/tmp/tmpOMCXSn', '/tmp/tmpA3FtZw']:

Change-Id: Id8b498df3ed7934815430e4b4c2651ef4aa781c6

tools/releasetools/common.py

index 124be6d..9e2b9a3 100755 (executable)
@@ -1390,7 +1390,7 @@ class Difference(object):
 
       if err or p.returncode != 0:
         print("WARNING: failure running %s:\n%s\n" % (
-            diff_program, "".join(err)))
+            cmd, "".join(err)))
         self.patch = None
         return None, None, None
       diff = ptemp.read()