rpc: don't encode bytes

bytes.encode() appeared in rpc.py by a mistake, should have been
bytes.decode()

https://pagure.io/freeipa/issue/4985

Reviewed-By: Felipe Volpone <fbarreto@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-08-28 10:52:15 +02:00
parent 947ac4bc1f
commit e09b6c2602

View File

@ -195,7 +195,7 @@ def xml_wrap(value, version):
if isinstance(value, crypto_x509.Certificate):
return base64.b64encode(
value.public_bytes(x509_Encoding.DER)).encode('ascii')
value.public_bytes(x509_Encoding.DER)).decode('ascii')
assert type(value) in (unicode, float, bool, type(None)) + six.integer_types
return value