[Reportbug-commits] [reportbug] 02/31: modify the bug script to cope with non-ascii characters; patch by Nis Martensen; Closes: #851322

Sandro Tosi morph at moszumanska.debian.org
Mon Jan 16 01:36:55 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 64367ea6cb72b24c25ec31740b4c5bb25c4fc564
Author: Sandro Tosi <morph at debian.org>
Date:   Sun Jan 15 15:24:09 2017 -0500

    modify the bug script to cope with non-ascii characters; patch by Nis Martensen; Closes: #851322
---
 debian/changelog | 5 ++++-
 share/script     | 4 ++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 21799c5..7075cc0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,11 @@ reportbug (7.1.3) UNRELEASED; urgency=medium
 
   * debian/control
     - bump Standards-Version to 3.9.8 (no changes needed)
+  * share/script
+    - modify the bug script to cope with non-ascii characters; patch by Nis
+      Martensen; Closes: #851322
 
- -- Sandro Tosi <morph at debian.org>  Wed, 04 Jan 2017 20:21:57 -0500
+ -- Sandro Tosi <morph at debian.org>  Sun, 15 Jan 2017 15:23:29 -0500
 
 reportbug (7.1.2) unstable; urgency=medium
 
diff --git a/share/script b/share/script
index ddc144e..e9b486c 100755
--- a/share/script
+++ b/share/script
@@ -4,7 +4,7 @@
 import os
 import re
 
-OUT=os.fdopen(3, 'w')
+OUT = os.fdopen(3, 'w', encoding='utf-8', errors='backslashreplace')
 
 envprint = False
 for var in ['EDITOR', 'PAGER', 'VISUAL', 'REPORTBUGEMAIL', 'DEBEMAIL', 'EMAIL',
@@ -22,7 +22,7 @@ if os.path.exists(USERFILE):
     if envprint:
         print(file=OUT)
     print('** %s:' % USERFILE, file=OUT)
-    for line in open(USERFILE, 'r'):
+    for line in open(USERFILE, 'r', encoding='utf-8', errors='backslashreplace'):
         line = line.strip()
         if line and not line.startswith('#'):
             m = passwdre.match(line)

-- 
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