fix(python): print error as string instead of bytes

This commit is contained in:
zach
2022-09-07 12:46:02 -07:00
parent 05e9084277
commit 4fa8030a64

View File

@@ -119,7 +119,7 @@ class Plugin:
if rc != 0:
error = lib.extism_error(self.plugin)
if error != ffi.NULL:
raise Error(ffi.string(error))
raise Error(ffi.string(error).decode())
raise Error(f"Error code: {rc}")
def call(self, name: str, data: Union[str, bytes]) -> bytes: