changeset 111:09c09067584c

Better error reporting for 00-INDEX files that don't list themselves.
author Rob Landley <rob@landley.net>
date Mon, 02 May 2011 14:15:35 -0500
parents 01b77829d010
children 7da9bd82122c
files make/docdiridx.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/docdiridx.py	Sat Feb 19 21:32:24 2011 -0600
+++ b/make/docdiridx.py	Mon May 02 14:15:35 2011 -0500
@@ -11,10 +11,14 @@
 
   lines = open("%s/00-INDEX" % dir[0]).read()
 
+  lines = lines.split("00-INDEX",1)
+  if len(lines)==1:
+    print "FAILED %s" % dir[0]
+    continue
+
   # Open output, write header and <pre> section (if any)
   out = open("%s/index.html" % dir[0], "w")
   out.write("<html>\n<title>%s</title>\n<body>\n<ul>\n" % dir[0])
-  lines = lines.split("00-INDEX",1)
   if lines[0]: out.write("<pre>%s</pre>\n" % lines[0])
   lines = lines[1].split("\n")
   lines[0] = "00-INDEX"