File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -496,8 +496,8 @@ def generate_zim(
496496 )
497497
498498 # Start creator early to detect problems early.
499- try :
500- with creator as started_creator :
499+ with creator as started_creator :
500+ try :
501501 logger .info (" Fetching the index..." )
502502 index = self .devdocs_client .get_index (doc_metadata .slug )
503503 logger .debug (f" The index has { len (index .entries )} entries." )
@@ -513,12 +513,10 @@ def generate_zim(
513513 db = db ,
514514 common_resources = common_resources ,
515515 )
516- except Exception :
517- logger .error (f" Deleting incomplete ZIM file: { zim_path } " )
518- zim_path .unlink (missing_ok = True )
516+ except Exception :
517+ started_creator .can_finish = False
519518
520- # bubble the exception to entrypoint and exit with code 1
521- raise
519+ raise
522520
523521 return zim_path
524522
You can’t perform that action at this time.
0 commit comments