(path)
| 423 | from test.support import _force_run |
| 424 | |
| 425 | def _rmtree_inner(path): |
| 426 | for name in _force_run(path, os.listdir, path): |
| 427 | fullname = os.path.join(path, name) |
| 428 | try: |
| 429 | mode = os.lstat(fullname).st_mode |
| 430 | except OSError as exc: |
| 431 | print("support.rmtree(): os.lstat(%r) failed with %s" |
| 432 | % (fullname, exc), |
| 433 | file=sys.__stderr__) |
| 434 | mode = 0 |
| 435 | if stat.S_ISDIR(mode): |
| 436 | _waitfor(_rmtree_inner, fullname, waitall=True) |
| 437 | _force_run(fullname, os.rmdir, fullname) |
| 438 | else: |
| 439 | _force_run(fullname, os.unlink, fullname) |
| 440 | _waitfor(_rmtree_inner, path, waitall=True) |
| 441 | _waitfor(lambda p: _force_run(p, os.rmdir, p), path) |
| 442 |
no test coverage detected
searching dependent graphs…