patman: Make command methods return a CommandResult
Rather than returning a list of things, return an object. That makes it
easier to access the returned items, and easier to extend the return
value later.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index ca3ba4a..77907c1 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -40,7 +40,7 @@
"""
pipe = [['git', 'log', '--no-color', '--oneline', '@{upstream}..'],
['wc', '-l']]
- stdout = command.RunPipe(pipe, capture=True, oneline=True)
+ stdout = command.RunPipe(pipe, capture=True, oneline=True).stdout
patch_count = int(stdout)
return patch_count