l#gPdZddlZddlZddlZejeZddddZdS)zHigh-level file operations.NF) max_triesctd|dzD]s} tj|||cS#t$rL}||ks|jtjtjfvrtd||Yd}~ld}~wwxYwdS)zMore robust shutil.rmtree. Retry on "Directory not empty" race condition: https://github.com/ansible/ansible/issues/34335#issuecomment-362995700 z Can't remove %s tree, reason: %sN) rangeshutilrmtreeOSErrorerrnoEEXIST ENOTEMPTYloggerwarning)path ignore_errorsonerrorries R/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/utils/_shutil.pyr r s 1i!m $ $ H H H=}g>> > > > H H HI~~ 1"" NN=tQ G G G G G G G G H H Hs/ BABB)FN)__doc__r loggingr getLogger__name__rr rrsj!!   8 $ $HHHHHHHHr