Browse Source

UTF-8 fixups.

suites/jessie-proposed-backports
Chris Lawrence 17 years ago
parent
commit
287e91523e
  1. 7
      debian/changelog
  2. 9
      reportbug
  3. 4
      reportbug.py

7
debian/changelog

@ -1,3 +1,10 @@
reportbug (3.29.1) unstable; urgency=low
* Fix crashes when maintainer name is UTF-8 encoded.
(Closes: #384423, #384547)
-- Chris Lawrence <lawrencc@debian.org> Thu, 24 Aug 2006 20:17:42 -0500
reportbug (3.29) unstable; urgency=low
* Send the version header in BTS queries.

9
reportbug

@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE."""
#
# Version ##VERSION##; see changelog for revision history
# $Id: reportbug,v 1.98.2.6 2006-08-24 20:34:42 lawrencc Exp $
# $Id: reportbug,v 1.98.2.7 2006-08-25 01:18:06 lawrencc Exp $
# Work around case where Python install might be broken (#290043)
try:
@ -1108,6 +1108,7 @@ class UI(object):
(pkgversion, pkgavail, depends, recommends, conffiles, maintainer,
installed, origin, vendor, reportinfo, priority, desc, src_name,
fulldesc, state) = status
maintainer = maintainer.encode(charset, 'replace')
buginfo = '/usr/share/bug/' + package
bugexec = submitas = submitto = presubj = None
@ -1303,11 +1304,7 @@ class UI(object):
bccaddr = os.environ.get('MAILBCC', fromaddr)
if maintainer:
lmaintainer = maintainer
if isinstance(maintainer, str):
lmaintainer = lmaintainer.decode('UTF-8', 'ignore')
lmaintainer = lmaintainer.encode(charset, 'replace')
ewrite("Maintainer for %s is '%s'.\n", package, lmaintainer)
ewrite("Maintainer for %s is '%s'.\n", package, maintainer)
if 'qa.debian.org' in maintainer:
ui.long_message('''\
This package is currently "orphaned"; if you are a current or prospective

4
reportbug.py

@ -21,7 +21,7 @@
#
# Version ##VERSION##; see changelog for revision history
#
# $Id: reportbug.py,v 1.35.2.2 2006-08-22 16:50:16 lawrencc Exp $
# $Id: reportbug.py,v 1.35.2.3 2006-08-25 01:18:06 lawrencc Exp $
VERSION = "reportbug ##VERSION##"
VERSION_NUMBER = "##VERSION##"
@ -266,7 +266,7 @@ def get_package_status(package, avail=False):
"COLUMNS=79 dpkg --status %s 2>/dev/null" % packarg)
# dpkg output is in UTF-8 format
output = output.decode('utf-8')
output = output.decode('utf-8', 'replace')
for line in output.split(os.linesep):
line = line.rstrip()

Loading…
Cancel
Save