(func, path, unused_exc_info)
| 69 | # files throws errors. To workaround this, if removing a path fails, we make |
| 70 | # the path writable and then try again |
| 71 | def onerror(func, path, unused_exc_info): # error handler for rmtree |
| 72 | if not os.access(path, os.W_OK): |
| 73 | os.chmod(path, stat.S_IWUSR) |
| 74 | func(path) |
| 75 | else: |
| 76 | # Swallow errors for now (on Windows there seems to be something weird |
| 77 | # going on and we can't remove the temp directory even after all files |
| 78 | # in it have been successfully removed) |
| 79 | pass |
| 80 | |
| 81 | shutil.rmtree(path, onerror=onerror) |
| 82 | logging.debug('Removed dir {0}'.format(path)) |
nothing calls this directly
no outgoing calls
no test coverage detected