Skip to content

Commit f361fc6

Browse files
author
Richard Jones
committed
compatibilty fix for pysqlite2 / unicode
1 parent 821d8ec commit f361fc6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4-
2009-08-10 1.4.9 (r4340)
4+
2009-08-10 1.4.9 (r4344)
55

66
Fixes:
77

roundup/backends/back_sqlite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ def sql_open_connection(self):
109109
conn = sqlite.connect(db, timeout=30)
110110
conn.row_factory = sqlite.Row
111111

112-
# sqlite3 wants us to store Unicode in the db but that's not what's
113-
# been done historically and it's definitely not what the other
114-
# backends do, so we'll stick with UTF-8
115-
if sqlite_version == 3:
112+
# pysqlite2 / sqlite3 want us to store Unicode in the db but
113+
# that's not what's been done historically and it's definitely
114+
# not what the other backends do, so we'll stick with UTF-8
115+
if sqlite_version in (2, 3):
116116
conn.text_factory = str
117117

118118
cursor = conn.cursor()

0 commit comments

Comments
 (0)