Skip to content
Permalink
Browse files

BUG: Don't put non-str in sys.path

Even as documented that other types are ignored [1],
it seemed to break on other versions of Python [2].

[1]: https://docs.python.org/3/library/sys.html#sys.path
[2]: https://travis-ci.org/pdoc3/pdoc/jobs/527591043#L218-L270
  • Loading branch information...
kernc committed May 3, 2019
1 parent 0f5f96e commit a3d0f25ae3f503cb125e3d56af6d5b04e93c6f37
Showing with 1 addition and 1 deletion.
  1. +1 −1 pdoc/__init__.py
@@ -162,7 +162,7 @@ def import_module(module, *, reload: bool = False) -> ModuleType:
@contextmanager
def _module_path(module):
from os.path import isfile, isdir, split, abspath, splitext
path, module = None, module
path, module = '_pdoc_dummy_nonexistent', module
if isdir(module) or isfile(module) and module.endswith(_SOURCE_SUFFIXES):
path, module = split(splitext(abspath(module))[0])
try:

0 comments on commit a3d0f25

Please sign in to comment.
You can’t perform that action at this time.