From: alex Date: Tue, 17 Oct 2023 20:35:29 +0000 (+0200) Subject: Add sync X-Git-Tag: 20240214-emacs~201 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=ea7726c3df7540972eb803d1f190cd484e8a2f86;p=alex.git Add sync --- diff --git a/scripts/p7s/bitwarden.py b/scripts/p7s/bitwarden.py index 9ce4d44..f3f26dd 100644 --- a/scripts/p7s/bitwarden.py +++ b/scripts/p7s/bitwarden.py @@ -47,6 +47,9 @@ class Bitwarden(): finally: del os.environ["BW_SESSION"] + def sync(self): + subprocess.run([self.bw_command, "sync"], check=True) + def status(self): return json.loads(subprocess.run([self.bw_command, "status"], check=True, stdout=subprocess.PIPE).stdout) @@ -58,4 +61,5 @@ def get_item(server, email, uuid): b = Bitwarden() b.download() with b.login(server, email): + b.sync() return b.get_item(uuid)