From 250d5b26cc4636dbf5542459eb041b55d712da10 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Fri, 19 Oct 2018 21:30:56 -0400 Subject: [PATCH] decode response from bw Running under python 3, the response from running the `bw` command is a byte string, so the lookup was returning to ansible values of the form `b'somestring'`. It is necessary to decode these results. --- lookup_plugins/bitwarden.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lookup_plugins/bitwarden.py b/lookup_plugins/bitwarden.py index e2feab4..4e7a86a 100755 --- a/lookup_plugins/bitwarden.py +++ b/lookup_plugins/bitwarden.py @@ -96,7 +96,7 @@ class Bitwarden(object): return out.strip() def get_entry(self, key, field): - return self._run(["get", field, key]) + return self._run(["get", field, key]).decode('utf-8') def get_custom_field(self, key, field): data = json.loads(self.get_entry(key, 'item'))