buildman: Produce a sensible error message when branch is missing
Rather than a backtrace, produce a nice error message when an invalid branch is provided to buildman. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -111,6 +111,10 @@ def DoBuildman(options, args):
|
||||
print col.Color(col.RED, str)
|
||||
sys.exit(1)
|
||||
count = gitutil.CountCommitsInBranch(options.git_dir, options.branch)
|
||||
if count is None:
|
||||
str = "Branch '%s' not found or has no upstream" % options.branch
|
||||
print col.Color(col.RED, str)
|
||||
sys.exit(1)
|
||||
count += 1 # Build upstream commit also
|
||||
|
||||
if not count:
|
||||
|
||||
Reference in New Issue
Block a user