Issue #499 - Only register cleanup if neither build or keep arguments have been passed.

This commit is contained in:
Chris Routh 2025-11-06 09:36:47 -08:00
parent 611d2033f7
commit 4595d2a302

View file

@ -856,7 +856,8 @@ def run(raw_args):
logger.info("Exiting, invalid warc2zim params")
return EXIT_CODE_WARC2ZIM_CHECK_FAILED
if not known_args.keep:
# only trigger cleanup when the keep argument is passed without a custom build dir.
if not known_args.build and not known_args.keep:
atexit.register(cleanup)
# copy / download custom behaviors to one single folder and configure crawler