From e0f9b840ca13fd6f054847012d1359c495216040 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 22 Jan 2014 13:33:47 +0100 Subject: [PATCH] gentoo_build: Print a nice error message if pushing a tag fails. --- gentoo_build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gentoo_build b/gentoo_build index 4809883..4de5d5a 100755 --- a/gentoo_build +++ b/gentoo_build @@ -408,7 +408,11 @@ def push_tag(logger, repo, tag, dry_run): "requested.".format(tag=tag)) else: logger.info("Pushing tag {tag}...".format(tag=tag)) - repo.git.push("origin", tag) + try: + repo.git.push("origin", tag) + except git.GitCommandError as error: + logger.error('Could not push tag: ' + str(error)) + sys.exit(1) if __name__ == '__main__': main() -- 2.39.5