]> granicus.if.org Git - python/commitdiff
include each row in the package table, even if there are no packages for
authorFred Drake <fdrake@acm.org>
Sun, 23 Jan 2005 22:14:16 +0000 (22:14 +0000)
committerFred Drake <fdrake@acm.org>
Sun, 23 Jan 2005 22:14:16 +0000 (22:14 +0000)
that row; the row is commented out in that case
(this makes it easier to modify the table after generation)

Doc/tools/mkpkglist

index 2c51ee75e88c56d9f90e173adf1f00f43eb01bc6..1a1fd78f2b9f6819012a67f7e83d669597d52477 100755 (executable)
@@ -67,14 +67,17 @@ for name, prefix in PKG_TYPES:
     have_tgz = isfile(tgz_fn)
     have_bz2 = isfile(bz2_fn)
 
-    if have_zip or have_tgz or have_bz2:
-        print "    <tr><td>%s</td>" % name
-
-        print get_file_cell(prefix, ".zip", have_zip)
-        print get_file_cell(prefix, ".tgz", have_tgz)
-        print get_file_cell(prefix, ".tar.bz2", have_bz2)
-
-        print "      </tr>"
+    have_some = have_zip or have_tgz or have_bz2
+
+    if not have_some:
+        print "    <!--"
+    print "    <tr><td>%s</td>" % name
+    print get_file_cell(prefix, ".zip", have_zip)
+    print get_file_cell(prefix, ".tgz", have_tgz)
+    print get_file_cell(prefix, ".tar.bz2", have_bz2)
+    print "      </tr>"
+    if not have_some:
+        print "      -->"
 
 print '''\
     </tbody>