]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/ceph_argparse: handle non ascii unicode args 8943/head
authorKefu Chai <kchai@redhat.com>
Fri, 22 Jul 2016 07:55:16 +0000 (15:55 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 22 Jul 2016 07:55:18 +0000 (15:55 +0800)
commit5864626d275c423cdb8d3e52a91fe4cc6b8e6f90
treecd32105aecc4ed7e1f4adfac42e5675f1a89ff2b
parent01b10c3aaad8e076a32d269cfedf10a2ead348ab
pybind/ceph_argparse: handle non ascii unicode args

we raise UnicodeDecodeError at seeing non-ascii args if we fail to match
it with any command signatures. instead, we should use a unicode string
for representing the error in that case. please note, the exception is
not printed at all in real-world. =)

Fixes: http://tracker.ceph.com/issues/12287
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/ceph_argparse.py
src/test/pybind/test_ceph_argparse.py