vici: Decode error messages in Python bindings

Otherwise we might end up with b'<errmsg>' in the output.
This commit is contained in:
Tobias Brunner 2021-01-13 14:41:50 +01:00
parent 414f2c3754
commit 2610cd7928
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ class Session(CommandWrappers, object):
if command_response["success"] != b"yes":
raise CommandException(
"Command failed: {errmsg}".format(
errmsg=command_response["errmsg"]
errmsg=command_response["errmsg"].decode("UTF-8")
)
)
@ -135,7 +135,7 @@ class Session(CommandWrappers, object):
if command_response["success"] != b"yes":
raise CommandException(
"Command failed: {errmsg}".format(
errmsg=command_response["errmsg"]
errmsg=command_response["errmsg"].decode("UTF-8")
)
)