fix: omit subprocess return code check

This avoids running into an Exception when bw (tested with bw 2023.1.0)
returns a non-zero exit code while checking if a bw session already exists.
This commit is contained in:
Markus Luisser 2023-01-26 12:08:04 +01:00 committed by Joao Jacome
parent cdaebb2930
commit 039f1940a0
No known key found for this signature in database
GPG key ID: C04BE487D6C743E2

View file

@ -68,7 +68,7 @@ def get_session(session: str) -> str:
return session return session
# Check if we're already logged in # Check if we're already logged in
proc_logged = subprocess.run(["bw", "login", "--check", "--quiet"], check=True) proc_logged = subprocess.run(["bw", "login", "--check", "--quiet"], check=False)
if proc_logged.returncode: if proc_logged.returncode:
logging.debug("Not logged into Bitwarden") logging.debug("Not logged into Bitwarden")