From 0f6efb32dc92bf0fb0d65b72bedaa4d135039578 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 17 Sep 2011 20:16:44 +0200 Subject: [PATCH] cleanup --- debian_build.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/debian_build.py b/debian_build.py index df31a18..80f3b79 100755 --- a/debian_build.py +++ b/debian_build.py @@ -339,6 +339,11 @@ if __name__ == '__main__': else: logger.info('git log was successfull') + new_log = git_log.stdout.read() + if new_log == '': + logger.info('git log since yesterday is empty, aborting build.') + sys.exit(0) + cmd = [ '/usr/bin/dch', '--create', @@ -349,13 +354,11 @@ if __name__ == '__main__': '--distribution', '%s' %(options.distribution), '--', - '%s' %(''.join(git_log.stdout.read())) + '%s' %(''.join(new_log)) ] logger.debug('Trying to call: %s' %(' '.join(cmd))) - new_log = git_log.stdout.read() - dch = subprocess.Popen( cmd, shell=False, @@ -373,13 +376,6 @@ if __name__ == '__main__': ) logger.info('debian/changelog written') - if new_log == '': - logger.info('git log since yesterday is empty, aborting build.') - sys.exit(0) - else: - logger.info('git log since yesterday: %s ' % new_log) - - # we need to commit here else git-buildpackage will use the existing debian/changelog... # TODO: Later we should investigate why the "--ignore-new" trick # did not work! -- 2.39.5