From 8a2bc75e555cec399f02f51fcc04e0f4a88f8bdb Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Sat, 18 Apr 2015 16:46:02 -0500 Subject: [PATCH] make it python 3 friendly --- thefuck/rules/no_command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/rules/no_command.py b/thefuck/rules/no_command.py index 7e7aa484..0b3f9037 100644 --- a/thefuck/rules/no_command.py +++ b/thefuck/rules/no_command.py @@ -22,7 +22,7 @@ def _get_candidate_commands(command, settings): if "No command" in output and "from package" in output: fixed_names = re.findall(r"Command '([^']*)' from package", output) - return filter(which, fixed_names) + return [name for name in fixed_names if which(name)] return []