summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2012-12-04 16:26:29 -0200
committerdrebs <drebs@leap.se>2012-12-04 16:26:29 -0200
commita0410a70d1ad2a3965ed1d8de7929ce70d6ea5fc (patch)
tree5fdafbc9edcf5f79a50d5743b0c1352bd03c3186
parent1b409bb1b6f5d0ae6630875f114f202823be420c (diff)
Insightful comment on gpg wrappers.
-rw-r--r--src/leap/soledad/leap.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/soledad/leap.py b/src/leap/soledad/leap.py
index 853906a3..2c815632 100644
--- a/src/leap/soledad/leap.py
+++ b/src/leap/soledad/leap.py
@@ -23,10 +23,11 @@ class LeapDocument(Document):
def __init__(self, doc_id=None, rev=None, json='{}', has_conflicts=False,
encrypted_json=None, default_key=None, gpg_wrapper=None):
super(LeapDocument, self).__init__(doc_id, rev, json, has_conflicts)
- if gpg_wrapper:
- self._gpg = gpg_wrapper
- else:
+ # we might want to get already initialized wrappers for testing.
+ if gpg_wrapper is None:
self._gpg = GPGWrapper()
+ else:
+ self._gpg = gpg_wrapper
if encrypted_json:
self.set_encrypted_json(encrypted_json)
self._default_key = default_key