Code

compatibilty fix for pysqlite2 / unicode
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 10 Aug 2009 04:25:15 +0000 (04:25 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 10 Aug 2009 04:25:15 +0000 (04:25 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4345 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/backends/back_sqlite.py

index f882af33f35df8ef510d9999437bb87b9c73eec9..0e49a0902db43da8a1b577b76778537eee8731a3 100644 (file)
@@ -1,7 +1,7 @@
 This file contains the changes to the Roundup system over time. The entries
 are given with the most recent entry first.
 
-2009-08-10 1.4.9 (r4340)
+2009-08-10 1.4.9 (r4344)
 
 Fixes:
 
index 59ada1a579b267cdd76ba4ad4467ebb8332759a3..245240f878142323f84a37c9b297581ff4714c9d 100644 (file)
@@ -109,10 +109,10 @@ class Database(rdbms_common.Database):
             conn = sqlite.connect(db, timeout=30)
             conn.row_factory = sqlite.Row
 
-        # sqlite3 wants us to store Unicode in the db but that's not what's
-        # been done historically and it's definitely not what the other
-        # backends do, so we'll stick with UTF-8
-        if sqlite_version == 3:
+        # pysqlite2 / sqlite3 want us to store Unicode in the db but
+        # that's not what's been done historically and it's definitely
+        # not what the other backends do, so we'll stick with UTF-8
+        if sqlite_version in (2, 3):
             conn.text_factory = str
 
         cursor = conn.cursor()