summaryrefslogtreecommitdiffstats
path: root/ipaclient
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2017-01-12 16:20:43 +0100
committerMartin Basti <mbasti@redhat.com>2017-01-24 13:25:47 +0100
commit18337bf7f7c31a47fe0c7280f82fca043b548bd5 (patch)
tree4878fdfa1a49582d93249bcc8ce157dd9bba1ac2 /ipaclient
parent0eb5a0e0ec2d232d2921ae5f9e8d0885146a5610 (diff)
downloadfreeipa-18337bf7f7c31a47fe0c7280f82fca043b548bd5.tar.gz
freeipa-18337bf7f7c31a47fe0c7280f82fca043b548bd5.tar.xz
freeipa-18337bf7f7c31a47fe0c7280f82fca043b548bd5.zip
py3: decode bytes for json.loads()
In py 3.5 json.loads requires to have string as input, all bytes must be decoded. Note: python 3.6 supports bytes for json.loads() https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaclient')
-rw-r--r--ipaclient/plugins/vault.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipaclient/plugins/vault.py b/ipaclient/plugins/vault.py
index 29157c7e1..9efb1f109 100644
--- a/ipaclient/plugins/vault.py
+++ b/ipaclient/plugins/vault.py
@@ -969,7 +969,7 @@ class vault_retrieve(Local):
json_vault_data = decoding_ctx.cipher_op(wrapped_vault_data)\
+ decoding_ctx.digest_final()
- vault_data = json.loads(json_vault_data)
+ vault_data = json.loads(json_vault_data.decode('utf-8'))
data = base64.b64decode(vault_data[u'data'].encode('utf-8'))
encrypted_key = None