The previous patch turned out to be incomplete. Here is a new version,
now tested.

The bug control file should probably also be updated. Attaching another
patch.

>From 098e23286bfa44566e4877dd9532ce5e436a799f Mon Sep 17 00:00:00 2001
From: Nis Martensen <[email protected]>
Date: Fri, 30 Dec 2016 14:11:24 +0100
Subject: [PATCH 2/4] 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)
-- 
2.1.4

>From a3de0701e7a847847a76d6c1f915a1b7cb030e08 Mon Sep 17 00:00:00 2001
From: Nis Martensen <[email protected]>
Date: Sat, 31 Dec 2016 11:36:00 +0100
Subject: [PATCH 3/4] Update bug control file to binary package change

---
 share/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/control b/share/control
index 49ceaa0..4e3e8d1 100644
--- a/share/control
+++ b/share/control
@@ -1 +1 @@
-Report-with: python-reportbug
\ No newline at end of file
+Report-with: python3-reportbug
-- 
2.1.4

_______________________________________________
Reportbug-maint mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint

Reply via email to