summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-07-05 12:08:24 -0300
committerTomás Touceda <chiiph@leap.se>2013-07-05 12:08:24 -0300
commitf3070dc7e586d1cfd36959cb79dc43a70c75bc28 (patch)
treeef00193caa04d31ce38fdf174a70a02180118bea
parent50d26f70a2d1ae4fc3644ddef9ceb22cb46fdca3 (diff)
parente5f650cc5efdc75fec96fa50f5a3c35a693f66f6 (diff)
Merge remote-tracking branch 'drebs/feature/3037-separate-keymanager-into-its-own-package' into develop
-rw-r--r--changes/bug_adapt-to-latest-soledad-api1
-rw-r--r--changes/feature_add-dependency-for-keymanager1
-rw-r--r--pkg/requirements.pip4
-rw-r--r--src/leap/mx/mail_receiver.py18
4 files changed, 14 insertions, 10 deletions
diff --git a/changes/bug_adapt-to-latest-soledad-api b/changes/bug_adapt-to-latest-soledad-api
new file mode 100644
index 0000000..95f0deb
--- /dev/null
+++ b/changes/bug_adapt-to-latest-soledad-api
@@ -0,0 +1 @@
+ o Adapt to Soledad 0.2.1 API.
diff --git a/changes/feature_add-dependency-for-keymanager b/changes/feature_add-dependency-for-keymanager
new file mode 100644
index 0000000..0ac1c2a
--- /dev/null
+++ b/changes/feature_add-dependency-for-keymanager
@@ -0,0 +1 @@
+ o Add dependency for leap.keymanager.
diff --git a/pkg/requirements.pip b/pkg/requirements.pip
index c09ce53..1bdb4dc 100644
--- a/pkg/requirements.pip
+++ b/pkg/requirements.pip
@@ -2,7 +2,9 @@ Twisted>=12.0.2
paisley>=0.3.1
## XXX change me to whatever you name the package in pypi
python-gnupg>=0.3.0
-leap.common>=0.2.3-dev
+leap.soledad
+leap.soledad_server
+leap.keymanager>=0.2.1
###############
# Development #
diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py
index 2c04863..b4e0d18 100644
--- a/src/leap/mx/mail_receiver.py
+++ b/src/leap/mx/mail_receiver.py
@@ -31,10 +31,10 @@ from twisted.application.service import Service
from twisted.internet import inotify
from twisted.python import filepath, log
-from leap.soledad import LeapDocument
-from leap.soledad.backends.leap_backend import EncryptionSchemes
-from leap.soledad.backends.couch import CouchDatabase
-from leap.common.keymanager import openpgp
+from leap.soledad.document import SoledadDocument
+from leap.soledad.target import EncryptionSchemes
+from leap.soledad_server.couch import CouchDatabase
+from leap.keymanager import openpgp
class MailReceiver(Service):
@@ -104,13 +104,13 @@ class MailReceiver(Service):
@type message: str
@return: uuid, doc to sync with Soledad
- @rtype: tuple(str, LeapDocument)
+ @rtype: tuple(str, SoledadDocument)
"""
uuid, pubkey = uuid_pubkey
log.msg("Encrypting message to %s's pubkey" % (uuid,))
log.msg("Pubkey: %s" % (pubkey,))
- doc = LeapDocument(doc_id=str(pyuuid.uuid4()))
+ doc = SoledadDocument(doc_id=str(pyuuid.uuid4()))
data = {'incoming': True, 'content': message}
@@ -137,12 +137,12 @@ class MailReceiver(Service):
def _export_message(self, uuid_doc):
"""
- Given a UUID and a LeapDocument, it saves it directly in the
+ Given a UUID and a SoledadDocument, it saves it directly in the
couchdb that serves as a backend for Soledad, in a db
accessible to the recipient of the mail
- @param uuid_doc: tuple that holds the UUID and LeapDocument
- @type uuid_doc: tuple(str, LeapDocument)
+ @param uuid_doc: tuple that holds the UUID and SoledadDocument
+ @type uuid_doc: tuple(str, SoledadDocument)
@return: True if it's ok to remove the message, False
otherwise