8000 (python) Change error message for unicode is passed but no encoding is · urso/msgpack-python@36b0c2d · GitHub
[go: up one dir, main page]

Skip to content

Commit 36b0c2d

Browse files
committed
(python) Change error message for unicode is passed but no encoding is
specified.
1 parent 752e3d1 commit 36b0c2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

msgpack/_msgpack.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ cdef class Packer(object):
120120
ret = msgpack_pack_raw_body(&self.pk, rawval, len(o))
121121
elif PyUnicode_Check(o):
122122
if not self.encoding:
123-
raise TypeError("Can't encode utf-8 no encoding is specified")
123+
raise TypeError("Can't pack unicode object: No encoding is specified")
124124
o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors)
125125
rawval = o
126126
ret = msgpack_pack_raw(&self.pk, len(o))

0 commit comments

Comments
 (0)
0