summaryrefslogtreecommitdiff
path: root/src/leap/soledad/__init__.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-05-27 12:44:15 -0300
committerTomás Touceda <chiiph@leap.se>2013-05-27 12:44:15 -0300
commitaa05d0c2076984ffe7e9b1f3ee84b7b1c0dea6b8 (patch)
tree11931448cecb041f4adaea3b8161b479e135f206 /src/leap/soledad/__init__.py
parent8cef16cd458801b1513bbcd6849edc4599204b6f (diff)
parent6238f80b9d9c8ea7091e196ccb69371050fd45db (diff)
Merge remote-tracking branch 'drebs/feature/2356-prevent-some-db-actions-in-server' into develop
Diffstat (limited to 'src/leap/soledad/__init__.py')
-rw-r--r--src/leap/soledad/__init__.py27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index 94a21447..b847364f 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -71,27 +71,7 @@ Path to the certificate file used to certify the SSL connection between
Soledad client and server.
"""
-
-#
-# Exceptions
-#
-
-class KeyDoesNotExist(Exception):
- """
- Soledad attempted to find a key that does not exist locally.
- """
-
-
-class KeyAlreadyExists(Exception):
- """
- Soledad attempted to create a key that already exists locally.
- """
-
-
-class NotADirectory(Exception):
- """
- Expected a path for a directory but got some other thing.
- """
+SECRETS_DOC_ID_HASH_PREFIX = 'uuid-'
#
@@ -522,7 +502,10 @@ class Soledad(object):
@return: the hash
@rtype: str
"""
- return sha256('uuid-%s' % self._uuid).hexdigest()
+ return sha256(
+ '%s%s' % (
+ SECRETS_DOC_ID_HASH_PREFIX,
+ self._uuid)).hexdigest()
def _shared_db(self):
"""