Skip to content

Commit c2d0942

Browse files
committed
keys can be utf-8
1 parent ca57916 commit c2d0942

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sqlcipher/signals.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
from __future__ import unicode_literals
2+
13
from django.conf import settings
24
from django.db.backends.signals import connection_created
35

46

57
def sqlite_set_pragma(connection, **kwargs):
6-
pragma_sql = "PRAGMA key='%s';" % (settings.PRAGMA_KEY,)
8+
pragma_sql = "PRAGMA key='%s';" % (settings.PRAGMA_KEY.decode("utf-8"),)
79
cursor = connection.cursor()
810
cursor.execute(pragma_sql)
911
cursor.close()

0 commit comments

Comments
 (0)