diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-14 20:46:11 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-17 08:11:38 -0500 |
| commit | 4f43e5c4353325eb8d1c455c58e299ef95e2e422 (patch) | |
| tree | a8bd6310a5f778a9a891e5d2e727838d172100a1 | |
| parent | 9dba901d9c44a117b35003e0c239476536c259aa (diff) | |
[1.8.x] Refs #24324 -- Fixed UnicodeEncodeError in SQLite backend while testing.
If 'name' contained non-ASCII characters, the comparison raised a
UnicodeEncodeError on Python 2.
Backport of 63c5c9870129f6b81358c1ed7ed2392bbc46f77d from master
| -rw-r--r-- | django/db/backends/sqlite3/base.py | 2 |
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') |
