summaryrefslogtreecommitdiff
path: root/common/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-01-07 12:29:56 -0300
committerTomás Touceda <chiiph@leap.se>2014-01-07 12:29:56 -0300
commitf57270eb597dee6104a4c507705ef5d1ba6a7516 (patch)
tree2e7280c065301306611fd60d614111c19e43acaa /common/src/leap
parentf98f66549d6762bbfc072ef6afe0057798a4da27 (diff)
parent82628d8284c5c11452da75a6604f2f68b8dd8520 (diff)
Merge remote-tracking branch 'refs/remotes/drebs/feature/4918_ensure-server-side-locks-use-temporary-directory' into develop
Diffstat (limited to 'common/src/leap')
-rw-r--r--common/src/leap/soledad/common/errors.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/common/src/leap/soledad/common/errors.py b/common/src/leap/soledad/common/errors.py
index 62de19f8..c41e0b0f 100644
--- a/common/src/leap/soledad/common/errors.py
+++ b/common/src/leap/soledad/common/errors.py
@@ -67,10 +67,19 @@ class LockTimedOutError(errors.U1DBError):
status = 408
+class CouldNotObtainLockError(errors.U1DBError):
+ """
+ Exception raised when timing out while trying to lock the shared database.
+ """
+
+ wire_description = "error obtaining lock"
+ status = 500
+
+
# update u1db "wire description to status" and "wire description to exception"
# maps.
for e in [InvalidTokenError, NotLockedError, AlreadyLockedError,
- LockTimedOutError]:
+ LockTimedOutError, CouldNotObtainLockError]:
http_errors.wire_description_to_status.update({
e.wire_description: e.status})
errors.wire_description_to_exc.update({