~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-21 18:09:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1953.
  • Revision ID: john@arbash-meinel.com-20060821180932-d7d326b1982e2b62
Raise a reasonable error when a command is non-ascii

Show diffs side-by-side

added added

removed removed

Lines of Context:
549
549
            alias_argv = [a.decode(bzrlib.user_encoding) for a in alias_argv]
550
550
            argv[0] = alias_argv.pop(0)
551
551
 
552
 
    cmd = str(argv.pop(0))
 
552
    cmd = argv.pop(0)
 
553
    try:
 
554
        cmd = cmd.encode('ascii')
 
555
    except UnicodeError:
 
556
        raise errors.UnicodeCommand(cmd)
553
557
 
554
558
    cmd_obj = get_cmd_object(cmd, plugins_override=not opt_builtin)
555
559
    if not getattr(cmd_obj.run_argv, 'is_deprecated', False):