summaryrefslogtreecommitdiff
path: root/subplot/client.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-05-29 11:39:31 +0300
committerLars Wirzenius <liw@liw.fi>2021-05-29 15:11:53 +0300
commit08b71890de3407acc323f09330ebe8a8ee2782ec (patch)
tree859d2a26dcc5517105bf5078f273fd24672ad756 /subplot/client.py
parente839c5f1c93e1fe024a2656d319721a7b23c6461 (diff)
downloadobnam2-08b71890de3407acc323f09330ebe8a8ee2782ec.tar.gz
refactor: only have client config without passwords
This means the config is always the config, and not sometimes the config or the config and passwords. Also, there's no config option for encrypting, anymore. It will not be optional now.
Diffstat (limited to 'subplot/client.py')
-rw-r--r--subplot/client.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/subplot/client.py b/subplot/client.py
index be0a6d6..d0beba5 100644
--- a/subplot/client.py
+++ b/subplot/client.py
@@ -16,7 +16,7 @@ def uninstall_obnam(ctx):
runcmd_run(ctx, ["chmod", "-R", "u+rwX", "."])
-def configure_client(ctx, filename=None):
+def configure_client_without_init(ctx, filename=None):
get_file = globals()["get_file"]
assert ctx.get("server_url") is not None
@@ -35,6 +35,15 @@ def configure_client(ctx, filename=None):
yaml.safe_dump(config, stream=f)
+def configure_client_with_init(ctx, filename=None):
+ runcmd_run = globals()["runcmd_run"]
+ runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"]
+
+ configure_client_without_init(ctx, filename=filename)
+ runcmd_run(ctx, ["obnam", "init", "--insecure-passphrase=hunter2"])
+ runcmd_exit_code_is_zero(ctx)
+
+
def run_obnam_restore(ctx, genid=None, todir=None):
runcmd_run = globals()["runcmd_run"]