vici: Decode error messages in Python bindings
Otherwise we might end up with b'<errmsg>' in the output.
This commit is contained in:
@@ -78,7 +78,7 @@ class Session(CommandWrappers, object):
|
|||||||
if command_response["success"] != b"yes":
|
if command_response["success"] != b"yes":
|
||||||
raise CommandException(
|
raise CommandException(
|
||||||
"Command failed: {errmsg}".format(
|
"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":
|
if command_response["success"] != b"yes":
|
||||||
raise CommandException(
|
raise CommandException(
|
||||||
"Command failed: {errmsg}".format(
|
"Command failed: {errmsg}".format(
|
||||||
errmsg=command_response["errmsg"]
|
errmsg=command_response["errmsg"].decode("UTF-8")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user