Skip to content

Commit

Permalink
Fixes joke2k#1439: Cast Path to a string for pkgutil.iter_modules (j…
Browse files Browse the repository at this point in the history
  • Loading branch information
fcurella committed Jun 2, 2021
1 parent 06ae896 commit 6e36d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faker/utils/loading.py
Expand Up @@ -32,7 +32,7 @@ def list_module(module: ModuleType) -> List[str]:
# PyInstaller
return [file.parent.name for file in Path(path).glob('*/__init__.py')]
else:
return [name for _, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]
return [name for _, name, is_pkg in pkgutil.iter_modules([str(path)]) if is_pkg]


def find_available_locales(providers: List[str]) -> List[str]:
Expand Down

0 comments on commit 6e36d17

Please sign in to comment.