def rmtree_errorhandler(func, path, exc_info):
exctype, value = exc_info[:<NUM_LIT:2>]<EOL>if not ((exctype is WindowsError and value.args[<NUM_LIT:0>] == <NUM_LIT:5>) or<EOL>(exctype is OSError and value.args[<NUM_LIT:0>] == <NUM_LIT>)):<EOL><INDENT>raise<EOL><DEDENT>if ((os.stat(path).st_mode & stat.S_IREAD) != stat.S_IREAD):<EOL><INDENT>raise<EOL><DEDENT>os.chmod(path, stat.S_IWRITE)<EOL>func(path)<EOL>
On Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems.