summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/soledad/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index e11b8319..4b7a12df 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -21,13 +21,15 @@ class Soledad(object):
# other configs
SECRET_LENGTH = 50
- def __init__(self, user_email, gpghome=None, initialize=True):
+ def __init__(self, user_email, gpghome=None, initialize=True,
+ prefix=None, secret_path=None, local_db_path=None):
self._user_email = user_email
+ self.PREFIX = prefix or self.PREFIX
+ self.SECRET_PATH = secret_path or self.SECRET_PATH
+ self.LOCAL_DB_PATH = local_db_path or self.LOCAL_DB_PATH
if not os.path.isdir(self.PREFIX):
os.makedirs(self.PREFIX)
- if not gpghome:
- gpghome = self.GNUPG_HOME
- self._gpg = GPGWrapper(gpghome=gpghome)
+ self._gpg = GPGWrapper(gpghome=(gpghome or self.GNUPG_HOME))
if initialize:
self._initialize()