From: Mathias Klette Date: Fri, 3 May 2013 12:58:50 +0000 (+0200) Subject: include fix again for printing changelog X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=5bcbe4f0537ab15abeaeafcb8836148438ed3ef1;p=profitbricks%2Fjenkins-build-scripts.git include fix again for printing changelog --- diff --git a/debian_build.py b/debian_build.py index d2308bc..9a6d093 100755 --- a/debian_build.py +++ b/debian_build.py @@ -330,12 +330,11 @@ if __name__ == '__main__': # let me see the first two changelog entries: - line_counter = 0 - for line in fileinput.input('debian/changelog'): - if line.startswith(' --'): - line_counter += 1 - if line_counter <= 2: - print('debian/changelog: %s' %(line.rstrip('\n'))) + # TODO: use changelog python libs instead of DCH calls, see above + cl = changelog.Changelog() + cl.parse_changelog(open('debian/changelog')) + logger.info('New changelog:\n\n%s' %( + ''.join([block.__str__() for block in cl._blocks[0:2]]))) # ACT IV: preparations are set, let's build