From affe129bcc5e6905b73ca74e5e6b0cfb00862690 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 4 Dec 2012 16:26:29 -0200 Subject: Insightful comment on gpg wrappers. --- leap.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/leap.py b/leap.py index 853906a3..2c815632 100644 --- a/leap.py +++ b/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 -- cgit v1.2.3