Skip to content

Commit

Permalink
Merge d1fe6ad into 0e79d32
Browse files Browse the repository at this point in the history
  • Loading branch information
toddrme2178 committed Feb 13, 2018
2 parents 0e79d32 + d1fe6ad commit d4338de
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions autoflake.py
Expand Up @@ -68,16 +68,18 @@

def standard_paths():
"""Yield paths to standard modules."""
path = distutils.sysconfig.get_python_lib(standard_lib=True)
for is_plat_spec in [True, False]:
path = distutils.sysconfig.get_python_lib(standard_lib=True,
plat_specific=is_plat_spec)

for name in os.listdir(path):
yield name

try:
for name in os.listdir(os.path.join(path, 'lib-dynload')):
for name in os.listdir(path):
yield name
except OSError: # pragma: no cover
pass

try:
for name in os.listdir(os.path.join(path, 'lib-dynload')):
yield name
except OSError: # pragma: no cover
pass


def standard_package_names():
Expand Down

0 comments on commit d4338de

Please sign in to comment.