]> xn--ix-yja.es Git - alex.git/commitdiff
Add sync
authoralex <alex@pdp7.net>
Tue, 17 Oct 2023 20:35:29 +0000 (22:35 +0200)
committeralex <alex@pdp7.net>
Tue, 17 Oct 2023 20:35:29 +0000 (22:35 +0200)
scripts/p7s/bitwarden.py

index 9ce4d44c64d7bdf4382fc93b5c066edfac92517a..f3f26dd11f724f4e3a5f224698bf4ff82ebbbca1 100644 (file)
@@ -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)