From: Ian Jackson Date: Thu, 24 Oct 2019 14:04:19 +0000 (+0100) Subject: make-secnet-sites: Crash if complain() is called too late X-Git-Tag: v0.5.0~22 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=e5baf0cd0e91353194df02c4c376b0c472f49ec2 make-secnet-sites: Crash if complain() is called too late Every call to complain() is supposed to occurs before the code in the main program which checks `complaints'. But maybe there is an erroneous late call, or one may be introduced. In this case it is important to crash, because otherwise bad data might end up being written into our output. Signed-off-by: Ian Jackson --- diff --git a/make-secnet-sites b/make-secnet-sites index a24c06f..ab125ff 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -585,6 +585,7 @@ if complaints>0: if complaints==1: print("There was 1 problem.") else: print("There were %d problems."%(complaints)) sys.exit(1) +complaints=None # arranges to crash if we complain later if service: # Put the user's input into their group file, and rebuild the main