Compare commits

..

No commits in common. "67692b372fbdff41bcedbfa5c4f5f2f68d46aef6" and "8a6219718aa1a972b396de39a170de69d5372d5a" have entirely different histories.

View File

@ -1,5 +1,4 @@
import os
import json
import subprocess
class BitwardenCommandException(Exception):
@ -9,11 +8,6 @@ def get_secret_from_bitwarden(id):
return command_wrapper(command=f"get item {id}")
def unlock_bw(logger):
status_output = command_wrapper("status")
status = json.loads(status_output)['status']
if status == 'unlocked':
logger.info("Already unlocked")
return
token_output = command_wrapper("unlock --passwordenv BW_PASSWORD")
tokens = token_output.split('"')[1::2]
os.environ["BW_SESSION"] = tokens[1]