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.
This commit is contained in:
Lars Kellogg-Stedman 2018-10-19 21:30:56 -04:00
parent 87616af387
commit 250d5b26cc

View file

@ -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'))