windows kicks up a ENOENT when a part of the path is not a dir
This commit is contained in:
		
							parent
							
								
									7636dc76e0
								
							
						
					
					
						commit
						5bd34f8ecc
					
				|  | @ -158,7 +158,9 @@ def _write_pyc(co, source_path, pyc): | ||||||
|     try: |     try: | ||||||
|         fp = open(pyc, "wb") |         fp = open(pyc, "wb") | ||||||
|     except IOError: |     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 |             # This happens when we get a EEXIST in find_module creating the | ||||||
|             # __pycache__ directory and __pycache__ is by some non-dir node. |             # __pycache__ directory and __pycache__ is by some non-dir node. | ||||||
|             return False |             return False | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue