Bug #12287
closedceph command line tool chokes on ceph –w (the dash is unicode 'en dash' &ndash, copy-paste to reproduce)
0%
Description
ubuntu@mira040:~$ sudo ceph –w
Traceback (most recent call last):
File "/usr/bin/ceph", line 896, in <module>
retval = main()
File "/usr/bin/ceph", line 839, in main
sigdict, inbuf, verbose)
File "/usr/bin/ceph", line 409, in new_style_command
valid_dict = validate_command(sigdict, cmdargs, verbose)
File "/usr/lib/python2.7/dist-packages/ceph_argparse.py", line 920, in validate_command
matched = matchnum(args, sig, partial=True)
File "/usr/lib/python2.7/dist-packages/ceph_argparse.py", line 733, in matchnum
validate_one(word, desc, partial and (len(words) == 0))
File "/usr/lib/python2.7/dist-packages/ceph_argparse.py", line 705, in validate_one
desc.instance.valid(word, partial)
File "/usr/lib/python2.7/dist-packages/ceph_argparse.py", line 496, in valid
if self.prefix.startswith(s):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
Not sure what the right behavior here should be, probably should just catch UnicodeDecodeError and print a useful error message instead.