summaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-05-08 08:06:08 +0000
committerTom Rini <trini@ti.com>2013-05-14 15:37:58 -0400
commitcce717a96c5840b0cf33e30c87fb1f2b8d633ee3 (patch)
tree8f40b0ed3d2f908abf140ece6d48280e3dfcf216 /tools/buildman
parent2a08b740e39d618f9428cfdcf8e1caa7239bcb8f (diff)
downloadu-boot-imx-cce717a96c5840b0cf33e30c87fb1f2b8d633ee3.zip
u-boot-imx-cce717a96c5840b0cf33e30c87fb1f2b8d633ee3.tar.gz
u-boot-imx-cce717a96c5840b0cf33e30c87fb1f2b8d633ee3.tar.bz2
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>
Diffstat (limited to 'tools/buildman')
-rw-r--r--tools/buildman/control.py4
1 files changed, 4 insertions, 0 deletions
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: