Author: Matti Picus <matti.pi...@gmail.com>
Branch: 
Changeset: r70672:5494b1aac76f
Date: 2014-04-16 06:07 +0300
http://bitbucket.org/pypy/pypy/changeset/5494b1aac76f/

Log:    os.path.isdir calls nt.isdir on win32 which is not rpython after
        PyWin is installed to host python

diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py
--- a/pypy/module/imp/importing.py
+++ b/pypy/module/imp/importing.py
@@ -2,7 +2,7 @@
 Implementation of the interpreter-level default import logic.
 """
 
-import sys, os, stat
+import sys, os, stat, genericpath
 
 from pypy.interpreter.module import Module
 from pypy.interpreter.gateway import interp2app, unwrap_spec
@@ -522,7 +522,8 @@
 
             path = space.str0_w(w_pathitem)
             filepart = os.path.join(path, partname)
-            if os.path.isdir(filepart) and case_ok(filepart):
+            # os.path.isdir on win32 is not rpython when pywin32 installed
+            if genericpath.isdir(filepart) and case_ok(filepart):
                 initfile = os.path.join(filepart, '__init__')
                 modtype, _, _ = find_modtype(space, initfile)
                 if modtype in (PY_SOURCE, PY_COMPILED):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to