From ea7726c3df7540972eb803d1f190cd484e8a2f86 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 17 Oct 2023 22:35:29 +0200 Subject: [PATCH] Add sync --- scripts/p7s/bitwarden.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.47.3