summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-02-14 20:46:11 -0500
committerTim Graham <timograham@gmail.com>2015-02-17 08:09:46 -0500
commit63c5c9870129f6b81358c1ed7ed2392bbc46f77d (patch)
tree263a1210016d5377e006c027ccf63ab4cbcf1d4e
parent81a94cc616ab80decaa495cfa1c0c623527fc0e7 (diff)
Refs #24324 -- Fixed UnicodeEncodeError in SQLite backend while testing.
If 'name' contained non-ASCII characters, the comparison raised a UnicodeEncodeError on Python 2.
-rw-r--r--django/db/backends/sqlite3/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 84d24e5bfe..6eb39ad2c3 100644
--- a/django/db/backends/sqlite3/base.py
+++ b/django/db/backends/sqlite3/base.py
@@ -299,7 +299,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
self.cursor().execute("BEGIN")
def is_in_memory_db(self, name):
- return name == ":memory:" or "mode=memory" in name
+ return name == ":memory:" or "mode=memory" in force_text(name)
FORMAT_QMARK_REGEX = re.compile(r'(?<!%)%s')