2007-09-18 00:48:56 |
Martin Pool |
description |
Bazaar gives a traceback if a unicode character is given in a command option:
mbp@grace% ./bzr st -ة
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\u0629' in position 17: ordinal not in range(128)
Traceback (most recent call last):
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 802, in run_bzr_catch_errors
return run_bzr(argv)
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 758, in run_bzr
ret = run(*run_argv)
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 465, in run_argv_aliases
args, opts = parse_args(self, argv, alias_argv)
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 544, in parse_args
options, args = parser.parse_args(args)
File "optparse.py", line 1380, in parse_args
self.error(str(err))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0629' in position 17: ordinal not in range(128)
Originally reported by "Grinchishin V." <grinchishin@zaporizhstal.com>
This is similar to bug 57123, but probably recurring because we have switched to using optparse since that commit was merged. Unlike that bug, this only happens with options, not command names. |
Bazaar gives a traceback if a unicode character is given in a command option:
mbp@grace% ./bzr st -ة
bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\u0629' in position 17: ordinal not in range(128)
Traceback (most recent call last):
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 802, in run_bzr_catch_errors
return run_bzr(argv)
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 758, in run_bzr
ret = run(*run_argv)
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 465, in run_argv_aliases
args, opts = parse_args(self, argv, alias_argv)
File "/home/mbp/bzr/trivial/bzrlib/commands.py", line 544, in parse_args
options, args = parser.parse_args(args)
File "optparse.py", line 1380, in parse_args
self.error(str(err))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0629' in position 17: ordinal not in range(128)
This is similar to bug 57123, but probably recurring because we have switched to using optparse since that commit was merged. Unlike that bug, this only happens with options, not command names. |
|