mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-21 12:28:41 +00:00
#71 Handle iterdir
iterator fails
This commit is contained in:
parent
798928b5ad
commit
bd5f5045aa
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
|
|
||||||
setup(name='thefuck',
|
setup(name='thefuck',
|
||||||
version="1.21",
|
version="1.22",
|
||||||
description="Magnificent app which corrects your previous console command",
|
description="Magnificent app which corrects your previous console command",
|
||||||
author='Vladimir Iakovlev',
|
author='Vladimir Iakovlev',
|
||||||
author_email='nvbn.rm@gmail.com',
|
author_email='nvbn.rm@gmail.com',
|
||||||
|
@ -12,8 +12,8 @@ def _safe(fn, fallback):
|
|||||||
|
|
||||||
def _get_all_bins():
|
def _get_all_bins():
|
||||||
return [exe.name
|
return [exe.name
|
||||||
for path in os.environ['PATH'].split(':')
|
for path in os.environ.get('PATH', '').split(':')
|
||||||
for exe in _safe(lambda: Path(path).iterdir(), [])
|
for exe in _safe(lambda: list(Path(path).iterdir()), [])
|
||||||
if not _safe(exe.is_dir, True)]
|
if not _safe(exe.is_dir, True)]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user