From 798928b5adc67cbacecc166937b6282b079ef7c1 Mon Sep 17 00:00:00 2001 From: nvbn Date: Tue, 21 Apr 2015 08:45:45 +0200 Subject: [PATCH] #71 Don't fail on non-exists dir in $PATH --- setup.py | 2 +- thefuck/rules/no_command.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index bdbd93fb..ee4c54dc 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup(name='thefuck', - version="1.20", + version="1.21", description="Magnificent app which corrects your previous console command", author='Vladimir Iakovlev', author_email='nvbn.rm@gmail.com', diff --git a/thefuck/rules/no_command.py b/thefuck/rules/no_command.py index bf5b86da..cfeab056 100644 --- a/thefuck/rules/no_command.py +++ b/thefuck/rules/no_command.py @@ -13,7 +13,7 @@ def _safe(fn, fallback): def _get_all_bins(): return [exe.name for path in os.environ['PATH'].split(':') - for exe in _safe(Path(path).iterdir, []) + for exe in _safe(lambda: Path(path).iterdir(), []) if not _safe(exe.is_dir, True)]