swh.loader.core.utils module

swh.loader.core.utils.clean_dangling_folders(dirpath, pattern_check, log=None)[source]
Clean up potential dangling temporary working folder rooted at

dirpath. Those folders must match a dedicated pattern and not belonging to a live pid.

Parameters
  • dirpath (str) – Path to check for dangling files

  • pattern_check (str) – A dedicated pattern to check on first

  • directory (e.g swh.loader.mercurial., (level) –

  • swh.loader.svn.)

  • log (Logger) – Optional logger