diff options
author | Kali Kaneko <kali@leap.se> | 2014-01-06 15:19:01 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-01-06 15:19:01 -0400 |
commit | f98f66549d6762bbfc072ef6afe0057798a4da27 (patch) | |
tree | 268983c0ac554860c39f25a7521fe45bc816aab7 /client | |
parent | a2fc60a03f701abd2309dee23c383f1189ce3cf4 (diff) | |
parent | 89d3e4a1321ff9701ac67933f8e649cfecd1d95e (diff) |
Merge remote-tracking branch 'drebs-github/bug/4435_add-proper-error-reporting-to-shared-db-lock' into develop
Diffstat (limited to 'client')
-rw-r--r-- | client/changes/bug_4435_catch-lock-timeout-exception | 1 | ||||
-rw-r--r-- | client/src/leap/soledad/client/__init__.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/client/changes/bug_4435_catch-lock-timeout-exception b/client/changes/bug_4435_catch-lock-timeout-exception new file mode 100644 index 00000000..12c05685 --- /dev/null +++ b/client/changes/bug_4435_catch-lock-timeout-exception @@ -0,0 +1 @@ + o Catch lock timeout exception (#4435). diff --git a/client/src/leap/soledad/client/__init__.py b/client/src/leap/soledad/client/__init__.py index d35d3a2a..11e8585b 100644 --- a/client/src/leap/soledad/client/__init__.py +++ b/client/src/leap/soledad/client/__init__.py @@ -54,6 +54,7 @@ from leap.soledad.common.errors import ( InvalidTokenError, NotLockedError, AlreadyLockedError, + LockTimedOutError, ) from leap.soledad.common.crypto import ( MacMethods, @@ -410,6 +411,8 @@ class Soledad(object): token, timeout = self._shared_db.lock() except AlreadyLockedError: raise BootstrapSequenceError('Database is already locked.') + except LockTimedOutError: + raise BootstrapSequenceError('Lock operation timed out.') try: self._get_or_gen_crypto_secrets() |