mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-20 12:23:16 +00:00
Fix exception incompatibility.
This commit is contained in:
parent
d766820421
commit
f0fd90a759
2 changed files with 5 additions and 4 deletions
|
@ -102,7 +102,10 @@ def unpackb(packed, object_hook=None, list_hook=None, use_list=True,
|
|||
encoding=encoding, unicode_errors=unicode_errors,
|
||||
object_pairs_hook=object_pairs_hook)
|
||||
unpacker.feed(packed)
|
||||
ret = unpacker._fb_unpack()
|
||||
try:
|
||||
ret = unpacker._fb_unpack()
|
||||
except OutOfData:
|
||||
raise UnpackValueError("Data is not enough.")
|
||||
if unpacker._fb_got_extradata():
|
||||
raise ExtraData(ret, unpacker._fb_get_extradata())
|
||||
return ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue