From e7b1cdcb854d899d42efebbc1b1e86f084cf93be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 7 May 2024 14:55:51 +0200 Subject: [PATCH] lookup_plugins/bitwarden: ignore stderr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we get weird JSON parsing errors: ``` An unhandled exception occurred while running the lookup plugin 'bitwarden'. Error was a , original message: Extra data: line 1 column 843 (char 842). Extra data: line 1 column 843 (char 842) ``` Signed-off-by: Jakub SokoĊ‚owski --- ansible/lookup_plugins/bitwarden.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/lookup_plugins/bitwarden.py b/ansible/lookup_plugins/bitwarden.py index 48c3c1f..d757ef0 100755 --- a/ansible/lookup_plugins/bitwarden.py +++ b/ansible/lookup_plugins/bitwarden.py @@ -100,7 +100,7 @@ class Bitwarden(object): if self.session != "": my_env["BW_SESSION"] = self.session p = Popen([self.cli_path] + args, stdin=PIPE, - stdout=PIPE, stderr=STDOUT, env=my_env) + stdout=PIPE, stderr=PIPE, env=my_env) out, _ = p.communicate() out = out.decode() rc = p.wait()