Iterate over all created locations and delete path tree for those marked with cleanup
()
| 435 | |
| 436 | |
| 437 | def cleanup_locations(): |
| 438 | """ |
| 439 | Iterate over all created locations and delete path tree for those marked with cleanup |
| 440 | """ |
| 441 | for obj in ScanLocation.get_instances(): # type: ScanLocation |
| 442 | if not obj.cleanup: |
| 443 | continue |
| 444 | else: |
| 445 | obj.do_cleanup() |
| 446 | |
| 447 | for location in CLEANUP_LOCATIONS: # type: Union[Path, ScanLocation] |
| 448 | if isinstance(location, ScanLocation): |
| 449 | location.do_cleanup() |
| 450 | |
| 451 | elif location.exists(): |
| 452 | logger.debug(f"Cleaning up {location}") |
| 453 | shutil.rmtree(location) |
| 454 | |
| 455 | |
| 456 | def get_diff_depth_limit() -> int: |
nothing calls this directly
no test coverage detected