mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-03 21:05:33 +00:00
Python 3 compatibility: raise unicode exception messages
In order to make exceptions display well with the Python binding on Python 3.x, return exception message as unicode/str rather than str/bytes.
This commit is contained in:
parent
faef4365cf
commit
1b957b7b50
|
@ -156,7 +156,7 @@ class UcError(Exception):
|
||||||
self.errno = errno
|
self.errno = errno
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return _uc.uc_strerror(self.errno)
|
return _uc.uc_strerror(self.errno).decode('ascii')
|
||||||
|
|
||||||
|
|
||||||
# return the core's version
|
# return the core's version
|
||||||
|
|
Loading…
Reference in a new issue