From c1ad272cc765c98e3eb82ea2795371e81f56ede3 Mon Sep 17 00:00:00 2001 From: Mathias Klette Date: Tue, 15 May 2012 13:52:59 +0200 Subject: [PATCH] raise an exception when checkout fails --- debian_build.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian_build.py b/debian_build.py index e6e5040..8979b8b 100755 --- a/debian_build.py +++ b/debian_build.py @@ -252,10 +252,10 @@ if __name__ == '__main__': repo = git.repo.Repo() #if GIT_BRANCH_NAME != 'master': - git_helper.git_new_branch_from( - GIT_BRANCH_NAME, - os.path.join('origin', GIT_BRANCH_NAME) - ) + localname = GIT_BRANCH_NAME + remotename = os.path.join('origin', GIT_BRANCH_NAME) + if not git_helper.git_new_branch_from(localname,remotename): + raise Exception('Checkout of %s was not successfull.' %( remotename )) # we need to make sure our jenkins config is used, so let's delete any # other config available in repository that might be prefered -- 2.39.5