diff options
author | INADA Naoki <songofacandy@gmail.com> | 2011-05-31 14:10:46 +0900 |
---|---|---|
committer | INADA Naoki <songofacandy@gmail.com> | 2011-05-31 14:10:46 +0900 |
commit | 36b0c2de411701699faadf6d7f355b95044e581c (patch) | |
tree | 4ec53de958fc1fa13606333e80f2196662410df0 /msgpack/_msgpack.pyx | |
parent | 752e3d1b783fc1c12a28e05a93aa73ac7c6b751c (diff) | |
download | msgpack-python-36b0c2de411701699faadf6d7f355b95044e581c.tar.gz |
(python) Change error message for unicode is passed but no encoding is
specified.
Diffstat (limited to 'msgpack/_msgpack.pyx')
-rw-r--r-- | msgpack/_msgpack.pyx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/msgpack/_msgpack.pyx b/msgpack/_msgpack.pyx index 443cbd7..14bc9d7 100644 --- a/msgpack/_msgpack.pyx +++ b/msgpack/_msgpack.pyx @@ -120,7 +120,7 @@ cdef class Packer(object): ret = msgpack_pack_raw_body(&self.pk, rawval, len(o)) elif PyUnicode_Check(o): if not self.encoding: - raise TypeError("Can't encode utf-8 no encoding is specified") + raise TypeError("Can't pack unicode object: No encoding is specified") o = PyUnicode_AsEncodedString(o, self.encoding, self.unicode_errors) rawval = o ret = msgpack_pack_raw(&self.pk, len(o)) |