diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2018-03-12 15:55:02 -0300 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-03-12 19:10:16 -0300 |
commit | 7e2b34f26e2c25e94974e37974bc683dce5f8757 (patch) | |
tree | b2e430ae0966922f236c29fb0eda22e4b3ded29c /tpm.c | |
parent | fb2e1cc6c45fd69082a4793a662778c7a747c452 (diff) |
qmp.py: Encode json data before sending
On Python 3, json.dumps() return a str object, which can't be
sent directly through a socket and must be encoded into a bytes
object. Use .encode('utf-8'), which will work on both Python 2
and Python 3.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20180312185503.5746-3-ehabkost@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'tpm.c')
0 files changed, 0 insertions, 0 deletions