diff options
author | Simon Glass <sjg@chromium.org> | 2014-04-20 10:50:13 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-05-09 14:50:39 -0600 |
commit | 757f64a89ba5bb04661b3f43444ca57fa6db1132 (patch) | |
tree | 280c8024a0922ccf485d55cd2995855f420d993d /tools | |
parent | 75b3c3aa843911f152098acf8eb551d6bb9d4f13 (diff) |
patman: Deal with 'git apply' failures correctly
This sort of failure is rare, but the code to deal with it is wrong.
Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/patman/gitutil.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 5dcbaa3bd79..3ea256de2e2 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -11,6 +11,7 @@ import subprocess import sys import terminal +import checkpatch import settings @@ -193,6 +194,7 @@ def ApplyPatch(verbose, fname): Args: fname: filename of patch file to apply """ + col = terminal.Color() cmd = ['git', 'am', fname] pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -203,8 +205,8 @@ def ApplyPatch(verbose, fname): print line match = re_error.match(line) if match: - print GetWarningMsg('warning', match.group(1), int(match.group(2)), - 'Patch failed') + print checkpatch.GetWarningMsg(col, 'warning', match.group(1), + int(match.group(2)), 'Patch failed') return pipe.returncode == 0, stdout def ApplyPatches(verbose, args, start_point): |