runtests.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:zoocore 作者: dsparrow27 项目源码 文件源码
def removeReadOnly(func, path, exc):
    """Called by shutil.rmtree when it encounters a readonly file.
    """
    excvalue = exc[1]
    if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES:
        os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)  # 0777
        func(path)
    else:
        raise RuntimeError('Could not remove {0}'.format(path))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号