Created
May 9, 2016 13:56
-
-
Save dnorton/9c9f465a9f458ac095c5f0b9cb74ec58 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shutil | |
import os | |
import stat | |
def remove_readonly(func, path, excinfo): | |
os.chmod(path, stat.S_IWRITE) | |
func(path) | |
shutil.rmtree("../../export", onerror=remove_readonly) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment