summaryrefslogtreecommitdiff
path: root/__init__.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-02-09 20:22:25 -0200
committerdrebs <drebs@leap.se>2013-02-09 20:22:25 -0200
commit103e0f83efac1576c41907a37467f2afe5ca5253 (patch)
tree2043f987cd342082d819c31aeaeb09075a75b65c /__init__.py
parentf99762eef055742d841bae965ef3b1eec2ca4631 (diff)
Soledad may be created without gpg/secret initialization.
Diffstat (limited to '__init__.py')
-rw-r--r--__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/__init__.py b/__init__.py
index 688ee160..6893c7a8 100644
--- a/__init__.py
+++ b/__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()