Commit 4f4fc49c authored by Stefan Behnel's avatar Stefan Behnel

make pyximport work with empty path entries in sys.path (== CWD)

parent a5cb8957
......@@ -176,7 +176,13 @@ class PyxImporter(object):
paths = sys.path
join_path = os.path.join
is_file = os.path.isfile
for path in filter(os.path.isdir, paths):
is_dir = os.path.isdir
for path in paths:
if not is_dir(path):
if not path:
path = os.getcwd()
else:
continue
for filename in os.listdir(path):
if filename == pyx_module_name:
return PyxLoader(fullname, join_path(path, filename),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment