New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 8 x64 - IO-Error #60150
Comments
OS Windows 8 Enterprise x64 clean installed. Problem is to delete one Directory and immediately after create one new with the same Name! !!! Code !!! import sys, platform, os, shutil TEST_PATH = "/test" print "platform:\t", platform.platform() if os.path.exists(TEST_PATH):
shutil.rmtree(TEST_PATH)
if not os.path.exists(TEST_PATH):
os.makedirs(TEST_PATH) print "success" !!! End of code !!! The error is only present if the Directory was deleted previously. Error:
Traceback (most recent call last):
File "dir_test.py", line 23, in <module>
os.makedirs(BUILD_PATH)
File "C:\Program Files\Python27\lib\os.py", line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 5] Zugriff verweigert: '/test' |
I believe this is a Windows...feature? We have lots of trouble with this ourselves in the test suite, if I understand correctly. |
I also think that it is a windows feature! who should report this problem with microsoft? |
I think it should be possible to add a wait=False parameter to rmtree which makes it block until the directory is gone away. This could be similar to the test.support feature added in bpo-15496. For compatibility, such a flag should default to False, and users need to be aware that this may block "indefinitely". I'd be opposed to specifying a timeout - users who need that can use the non-blocking version, and then loop themselves (or we expose a separate wait function with a timeout). Of course, such a feature could not be added to 2.7. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: