/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-22 21:31:23 UTC
  • mto: This revision was merged to the branch mainline in revision 1953.
  • Revision ID: john@arbash-meinel.com-20060822213123-15cf5e4c6a9ab4d2
Don't raise UnicodeCommand on request, instead just let it fall out when we get to NoSuchCommand

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    """
62
62
    global plugin_cmds
63
63
    k = cmd.__name__
 
64
 
64
65
    if k.startswith("cmd_"):
65
66
        k_unsquished = _unsquish_command_name(k)
66
67
    else:
130
131
    """
131
132
    from bzrlib.externalcommand import ExternalCommand
132
133
 
133
 
    cmd_name = str(cmd_name)            # not unicode
 
134
    try:
 
135
        cmd_name = str(cmd_name)
 
136
    except UnicodeError:
 
137
        pass 
 
138
        # We want only 'ascii' command names, but the user may have typed
 
139
        # in a Unicode name. In that case, they should just get a
 
140
        # 'command not found' error later.
 
141
        # In the future, we may actually support Unicode command names.
134
142
 
135
143
    # first look up this command under the specified name
136
144
    cmds = _get_cmd_dict(plugins_override=plugins_override)
553
561
    try:
554
562
        cmd = cmd.encode('ascii')
555
563
    except UnicodeError:
556
 
        raise errors.UnicodeCommand(cmd)
 
564
        pass 
 
565
        # We want only 'ascii' command names, but the user may have typed
 
566
        # in a Unicode name. In that case, they should just get a
 
567
        # 'command not found' error later.
557
568
 
558
569
    cmd_obj = get_cmd_object(cmd, plugins_override=not opt_builtin)
559
570
    if not getattr(cmd_obj.run_argv, 'is_deprecated', False):