From: Robin Wittler Date: Wed, 7 Sep 2011 09:37:46 +0000 (+0200) Subject: add error handling X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=48f1780c64bb3daaaf8c099b623159688a2bf85f;p=profitbricks%2Fjenkins-build-scripts.git add error handling --- diff --git a/build.py b/build.py index f9ba9b8..a664750 100755 --- a/build.py +++ b/build.py @@ -417,10 +417,13 @@ if __name__ == '__main__': logger.info('starting git-buildpackage') ret = gbp.build() - logger.debug( - 'This is the returncode of git-buildpackage: \n%s' - %(ret) - ) + if ret: + logger.error( + 'git-buildpackage returned non-zero. exitcode was: %s', ret + ) + exit_error() + else: + logger.debug('git-buildpackage executed successfully') if not ret: build_log=os.path.join('../build-area/result/', '%s_%s_amd64.build' % (pkg_name, version)) try: