[Reportbug-maint] Bug#541791: TypeError: writelines() argument must be a sequence of strings

Carl Chenet chaica at ohmytux.com
Mon Aug 17 22:04:45 UTC 2009


Package: reportbug
Version: 4.5
Severity: normal
Tags: patch

Hi,

Here is a patch to solve this issue.

Bye,
Carl Chenet


-- Package-specific info:
** Environment settings:
DEBEMAIL="chaica at ohmytux.com"
DEBFULLNAME="Carl Chenet"
INTERFACE="text"

** /home/chaica/.reportbugrc:
reportbug_version "4.5"
mode novice
ui text
smtphost "smtp.free.fr"

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages reportbug depends on:
ii  apt                           0.7.21     Advanced front-end for dpkg
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-reportbug              4.5        Python modules for interacting wit

reportbug recommends no packages.

Versions of packages reportbug suggests:
pn  debconf-utils                 <none>     (no description available)
ii  debsums                       2.0.44     verification of installed package 
pn  dlocate                       <none>     (no description available)
ii  exim4                         4.69-9     metapackage to ease Exim MTA (v4) 
ii  exim4-daemon-light [mail-tran 4.69-9     lightweight Exim MTA (v4) daemon
ii  file                          5.00-1     Determines file type using "magic"
ii  gnupg                         1.4.9-4    GNU privacy guard - a free PGP rep
pn  python-gnome2-extras          <none>     (no description available)
pn  python-gtk2                   <none>     (no description available)
pn  python-urwid                  <none>     (no description available)
pn  python-vte                    <none>     (no description available)

-- no debconf information
-------------- next part --------------
>From 3a9a4b66516ca969578c42f71150189d23afb663 Mon Sep 17 00:00:00 2001
From: chaica <chaica at ohmytux.com>
Date: Mon, 17 Aug 2009 23:59:33 +0200
Subject: [PATCH] filter option fix

---
 reportbug/ui/text_ui.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/reportbug/ui/text_ui.py b/reportbug/ui/text_ui.py
index 426340c..2eeb920 100644
--- a/reportbug/ui/text_ui.py
+++ b/reportbug/ui/text_ui.py
@@ -759,6 +759,12 @@ def search_bugs(hierarchyfull, bts, queryonly, mirrors,
     """Search for the bug list using a pattern."""
     """Return string "FilterEnd" when we are done with search."""
 
+    try:
+        output_encoding = locale.getpreferredencoding()
+    except locale.Error, msg:
+        print msg
+        sys.exit(1)
+
     pattern = our_raw_input(
 	'Enter the search pattern (a Perl-compatible regular expression)\n'
 	'or press ENTER to exit: ')
@@ -847,7 +853,8 @@ def search_bugs(hierarchyfull, bts, queryonly, mirrors,
                     helptext['n'] = helptext['n'][:-1]+' (skip to Next page).'
 
                 while 1:
-                    sys.stderr.writelines(lastpage)
+                    for line in lastpage:
+                        sys.stderr.write(line.encode(output_encoding, "replace"))
                     x = select_options(pstr, options, helptext,
                                        allow_numbers=allowed)
                     if x == 'n':
-- 
1.6.2.3



More information about the Reportbug-maint mailing list