for path in paths:
try:
if not os.path.exists(path):
- logger.info(
- 'Cleanup of %s impossible: Not existing'
+ logger.debug(
+ 'Cleanup not neccessary: %s not found'
%(path)
)
continue
cmd=os.unlink
else:
raise Exception(
- 'Cleanup of %s impossible: Unknown file type'
+ 'Cleanup not necessary: %s has unknown file type'
%(path)
)
continue
logger.debug(
- 'Trying to remove %s'
+ 'Cleanup necessary: %s found'
%(path)
)
cmd(path)
result["bads"].setdefault(path, error)
else:
result["goods"].setdefault(path, True)
+ logger.info(
+ 'Cleanup: %s removed'
+ %(path)
+ )
return result