chiark / gitweb /
make-secnet-sites: If definition found in wrong place, bomb out
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 17 Dec 2011 21:38:02 +0000 (21:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 12 Jul 2012 18:54:26 +0000 (19:54 +0100)
If it doesn't exit here, make-secnet-sites might subsequently crash
with Python stack backtrace.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
make-secnet-sites

index c49467a19f687c5f1fb78dfb15ebe44a5790c9ae..9e0072075a8c69ae3a7cbb865d0d46188b25c7e2 100755 (executable)
@@ -376,6 +376,8 @@ def pline(i,allow_include=False):
                        if nl.depth<allow_defs:
                                complain("New definitions not allowed at "
                                        "level %d"%nl.depth)
+                               # we risk crashing if we continue
+                               sys.exit(1)
                        current.children[w[1]]=nl
                        current=nl
                obstack.append(current)