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>
This commit is contained in:
Simon Glass
2012-12-15 10:42:04 +00:00
parent 71162e3cae
commit a10fd93cbc
3 changed files with 64 additions and 24 deletions

View File

@@ -346,7 +346,7 @@ def GetMetaData(start, count):
"""
pipe = [['git', 'log', '--no-color', '--reverse', 'HEAD~%d' % start,
'-n%d' % count]]
stdout = command.RunPipe(pipe, capture=True)
stdout = command.RunPipe(pipe, capture=True).stdout
series = Series()
ps = PatchStream(series, is_log=True)
for line in stdout.splitlines():