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.
Updated by Kefu Chai almost 9 years ago
- Status changed from New to Fix Under Review
Updated by Kefu Chai over 8 years ago
- Status changed from Fix Under Review to Resolved
Updated by Kefu Chai almost 8 years ago
- Status changed from 12 to Fix Under Review
Updated by Kefu Chai almost 8 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler almost 8 years ago
- Copied to Backport #16798: jewel: ceph command line tool chokes on ceph –w (the dash is unicode 'en dash' &ndash, copy-paste to reproduce) added
Updated by Nathan Cutler over 7 years ago
- Status changed from Pending Backport to Resolved