File: trac_unicode.patch

package info (click to toggle)
bugwarrior 1.8.0-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,280 kB
  • sloc: python: 9,226; makefile: 147
file content (21 lines) | stat: -rw-r--r-- 943 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Debian Tasktools Team <team+tasktools@tracker.debian.org>
Date: Sun, 10 Dec 2023 08:44:58 +0100
Subject: trac_unicode

---
 bugwarrior/services/trac.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bugwarrior/services/trac.py b/bugwarrior/services/trac.py
index 66c5cb1..18ce622 100644
--- a/bugwarrior/services/trac.py
+++ b/bugwarrior/services/trac.py
@@ -160,7 +160,7 @@ class TracService(IssueService):
                 raise RuntimeError("Trac responded with %s" % resp)
             # strip Trac's bogus BOM
             text = resp.text[1:].lstrip(u'\ufeff')
-            tickets = list(csv.DictReader(StringIO.StringIO(text.encode('utf-8'))))
+            tickets = list(csv.DictReader(StringIO.StringIO(text)))
             issues = [(self.target, ticket) for ticket in tickets]
             for i in range(len(issues)):
                 issues[i][1]['url'] = "%s/ticket/%s" % (base_url, tickets[i]['id'])