summaryrefslogtreecommitdiff
path: root/gbp/scripts/dch.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-02-19 11:29:43 +0100
committerGuido Günther <agx@sigxcpu.org>2015-02-20 12:39:00 +0100
commit0a4725c045a5a55592dafd41c6ef6f9bab4791cd (patch)
treeca9f3e8bea00d455e8f8b2c21bba947adc16b976 /gbp/scripts/dch.py
parentf7afe1d06c56748c6d9bfcae6166beba21bb3e53 (diff)
Don't use print as a statement
via 2to3-3.4 -w -f print . to work towards python3 support Gbp-Dch: Ignore
Diffstat (limited to 'gbp/scripts/dch.py')
-rw-r--r--gbp/scripts/dch.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py
index e725bb1..b6c77b1 100644
--- a/gbp/scripts/dch.py
+++ b/gbp/scripts/dch.py
@@ -17,6 +17,8 @@
#
"""Generate Debian changelog entries from Git commit messages"""
+from __future__ import print_function
+
import ConfigParser
import os.path
import re
@@ -137,8 +139,8 @@ def mangle_changelog(changelog, cp, snapshot=''):
cw = open(tmpfile, 'w')
cr = open(changelog, 'r')
- print >>cw, ("%(Source)s (%(MangledVersion)s) "
- "%(Distribution)s; urgency=%(urgency)s\n" % cp)
+ print("%(Source)s (%(MangledVersion)s) "
+ "%(Distribution)s; urgency=%(urgency)s\n" % cp, file=cw)
cr.readline() # skip version and empty line
cr.readline()
@@ -148,10 +150,10 @@ def mangle_changelog(changelog, cp, snapshot=''):
line = ''
if snapshot:
- print >>cw, " ** SNAPSHOT build @%s **\n" % snapshot
+ print(" ** SNAPSHOT build @%s **\n" % snapshot, file=cw)
if line:
- print >>cw, line.rstrip()
+ print(line.rstrip(), file=cw)
shutil.copyfileobj(cr, cw)
cw.close()
cr.close()