3 F\n @slddlZddlZddlZddlZddlZy ddlZWnek rPddlZYnXejddZ ddZ dS)Nc csPtjdkrtj}ntj}|j||Vt|d}|j|WdQRXdS)Nw)rr)sys version_info configparser ConfigParserSafeConfigParserreadopenwrite)filenamecfgfprc/private/var/folders/pf/wv4htv3x0qs2c2mp0dnn0kchsvlck3/T/pip-install-emcbgzcf/pbr/pbr/tests/util.py open_config5s    rcCsdd}tj||dS)zkshutil.rmtree() with error handler. Handle 'access denied' from trying to delete read-only files. cSs,tj|tjs&tj|tj||ndS)N)osaccessW_OKchmodstatS_IWUSR)funcpathexc_inforrronerrorGs zrmtree..onerror)r)shutilrmtree)rrrrrrAsr) contextlibrrrrrr ImportErrorcontextmanagerrrrrrr)s