[py-svn] commit/pytest: gutworth: windows kicks up a ENOENT when a part of the path is not a dir

Bitbucket commits-noreply at bitbucket.org
Thu Aug 18 21:40:07 CEST 2011


1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/6e94b1809f67/
changeset:   6e94b1809f67
user:        gutworth
date:        2011-08-18 21:39:57
summary:     windows kicks up a ENOENT when a part of the path is not a dir
affected #:  1 file (83 bytes)

--- a/_pytest/assertion/rewrite.py	Mon Aug 01 10:53:37 2011 +0200
+++ b/_pytest/assertion/rewrite.py	Thu Aug 18 14:39:57 2011 -0500
@@ -158,7 +158,9 @@
     try:
         fp = open(pyc, "wb")
     except IOError:
-        if sys.exc_info()[1].errno == errno.ENOTDIR:
+        err = sys.exc_info()[1].errno
+        if (err == errno.ENOTDIR or
+            sys.platform == "win32" and err == errno.ENOENT):
             # This happens when we get a EEXIST in find_module creating the
             # __pycache__ directory and __pycache__ is by some non-dir node.
             return False

Repository URL: https://bitbucket.org/hpk42/pytest/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the pytest-commit mailing list