[Reportbug-commits] [reportbug] 01/04: Port bug script to python3
Sandro Tosi
morph at moszumanska.debian.org
Thu Jan 5 00:52:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository reportbug.
commit 4f18b2e98477705cf038b5ce06a2c6cfd88a6458
Author: Nis Martensen <nis.martensen at web.de>
Date: Fri Dec 30 14:11:24 2016 +0100
Port bug script to python3
---
share/script | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/share/script b/share/script
index e64c5e9..ddc144e 100755
--- a/share/script
+++ b/share/script
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/python3
# -*- python -*-
import os
@@ -11,21 +11,21 @@ for var in ['EDITOR', 'PAGER', 'VISUAL', 'REPORTBUGEMAIL', 'DEBEMAIL', 'EMAIL',
'DEBFULLNAME', 'DEBNAME', 'NAME', 'INTERFACE']:
if var in os.environ:
if not envprint:
- print >> OUT, '** Environment settings:'
+ print('** Environment settings:', file=OUT)
envprint = True
- print >> OUT, '%s="%s"' % (var, os.environ[var])
+ print('%s="%s"' % (var, os.environ[var]), file=OUT)
passwdre = re.compile(r'\s*(smtppasswd)\s+(.*)$')
USERFILE = os.path.expanduser('~/.reportbugrc')
if os.path.exists(USERFILE):
if envprint:
- print >> OUT
- print >> OUT, '** %s:' % USERFILE
- for line in file(USERFILE):
+ print(file=OUT)
+ print('** %s:' % USERFILE, file=OUT)
+ for line in open(USERFILE, 'r'):
line = line.strip()
if line and not line.startswith('#'):
m = passwdre.match(line)
if m:
line = '%s <omitted>' % m.group(1)
- print >> OUT, line
+ print(line, file=OUT)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git
More information about the Reportbug-commits
mailing list