Skip to content

Commit

Permalink
Try sqlcipher3, fixes #530
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Feb 18, 2015
1 parent 49e6609 commit 3fd8c63
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion playhouse/sqlcipher_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@

from peewee import *
from playhouse.sqlite_ext import SqliteExtDatabase
from pysqlcipher import dbapi2 as sqlcipher
try:
from pysqlcipher import dbapi2 as sqlcipher
except ImportError:
try:
from pysqlcipher3 import dbapi2 as sqlcipher
except ImportError:
raise RuntimeError('Sqlcipher python bindings not found.')

sqlcipher.register_adapter(decimal.Decimal, str)
sqlcipher.register_adapter(datetime.date, str)
Expand Down

0 comments on commit 3fd8c63

Please sign in to comment.