You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, os.rmtree cannot not remove directories with read-only files; such are the git db directories.
The fix is something like this:
...
finally:
# Need to collect here to be sure all handles have been closed. It appears# a windows-only issue. In fact things should be deleted, as well as# memory maps closed, once objects go out of scope. For some reason# though this is not the case here unless we collect explicitly.ifnotkeep:
gc.collect()
# From http://stackoverflow.com/a/4829285/548792defon_rm_error(func, path, exc_info):
importstatos.chmod(path, stat.S_IWRITE)
func(path)
shutil.rmtree(path, onerror=on_rm_error)
The text was updated successfully, but these errors were encountered:
I assume that this one could be fixed in conjunction with this PR ?
In any case, thanks for reporting, it's good to keep track of the issue and a possible solution.
On Windows,
os.rmtree
cannot not remove directories with read-only files; such are the git db directories.The fix is something like this:
The text was updated successfully, but these errors were encountered: