From 48f1780c64bb3daaaf8c099b623159688a2bf85f Mon Sep 17 00:00:00 2001 From: Robin Wittler Date: Wed, 7 Sep 2011 11:37:46 +0200 Subject: [PATCH] add error handling --- build.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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: -- 2.39.5