Stop trying to lowercase commands, it wasn't working anyway

This commit is contained in:
Matthew Iversen 2014-04-16 07:47:15 +10:00
parent 9539ce21cb
commit 000a59d8ee
2 changed files with 6 additions and 6 deletions

View File

@ -149,11 +149,11 @@ def parseopts(args):
sys.exit()
# the subcommand name
cmd_name = args_else[0].lower()
cmd_name = args_else[0]
# all the args without the subcommand
cmd_args = args[:]
cmd_args.remove(args_else[0].lower())
cmd_args.remove(args_else[0])
if cmd_name not in commands:
guess = get_similar_commands(cmd_name)

View File

@ -67,14 +67,14 @@ def get_similar_commands(name):
"""Command name auto-correct."""
from difflib import get_close_matches
name = name.lower()
close_commands = get_close_matches(name, commands.keys())
if close_commands:
guess = close_commands[0]
return close_commands[0]
else:
guess = False
return guess
return False
def _sort_commands(cmddict, order):