diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2015-08-12 18:56:38 -0300 |
---|---|---|
committer | Bruno Wagner <bwgpro@gmail.com> | 2015-08-12 19:03:50 -0300 |
commit | ffde23f71594cec5775a1579cdc0ee4b019fbf6d (patch) | |
tree | 02be041313b1462e1b43bc9ecd1ec70f1d205b1d /common/src/leap/soledad/common/errors.py | |
parent | 861f7d355f2b42b02d00906cbb63351cbc5d0146 (diff) |
[bug] wrong sqlcipher passphrase now raises correctly
When you tried to start a local sqlcipher that was created
before, with the wrong passphrase, the code was raising
a sqlcipher DatabaseError, there were tests covering this
but they were expecting a WrongMacError that was never raised.
I added code to wrap the DatabaseError and raise a new exception
DatabaseAccessError that is specific to soledad and adapted the
tests to expect it
Diffstat (limited to 'common/src/leap/soledad/common/errors.py')
-rw-r--r-- | common/src/leap/soledad/common/errors.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/src/leap/soledad/common/errors.py b/common/src/leap/soledad/common/errors.py index f285cc77..5798770b 100644 --- a/common/src/leap/soledad/common/errors.py +++ b/common/src/leap/soledad/common/errors.py @@ -51,6 +51,11 @@ class SoledadError(errors.U1DBError): # Authorization errors # + +class DatabaseAccessError(Exception): + pass + + @register_exception class InvalidAuthTokenError(errors.Unauthorized): |