diff options
author | drebs <drebs@leap.se> | 2013-02-09 20:22:25 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-02-09 20:22:25 -0200 |
commit | a4a46d4a9cfc22324cb8a2037a5c4825f14b4b1b (patch) | |
tree | b0167cd8e5afe0ac0c0c98ce627db72eb0e605ab /src/leap/soledad/__init__.py | |
parent | a0f36427f9473c7f2d759b9d0605b72d2c401731 (diff) |
Soledad may be created without gpg/secret initialization.
Diffstat (limited to 'src/leap/soledad/__init__.py')
-rw-r--r-- | src/leap/soledad/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py index 688ee160..6893c7a8 100644 --- a/src/leap/soledad/__init__.py +++ b/src/leap/soledad/__init__.py @@ -21,13 +21,17 @@ class Soledad(object): # other configs SECRET_LENGTH = 50 - def __init__(self, user_email, gpghome=None): + def __init__(self, user_email, gpghome=None, initialize=True): self._user_email = user_email if not os.path.isdir(self.PREFIX): os.makedirs(self.PREFIX) if not gpghome: gpghome = self.GNUPG_HOME self._gpg = GPGWrapper(gpghome=gpghome) + if initialize: + self._initialize() + + def _initialize(self): # load/generate OpenPGP keypair if not self._has_openpgp_keypair(): self._gen_openpgp_keypair() |