From cce717a96c5840b0cf33e30c87fb1f2b8d633ee3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 8 May 2013 08:06:08 +0000 Subject: 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 --- tools/buildman/control.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/buildman') diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 3e5f56c..4319ce7 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -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: -- cgit v1.1