diff options
| author | scoder <none@none> | 2007-02-23 10:58:14 +0100 |
|---|---|---|
| committer | scoder <none@none> | 2007-02-23 10:58:14 +0100 |
| commit | 48923a15e2a6650fd0256ed17ae0787ac87b1658 (patch) | |
| tree | 99e3cda28866de2acea568d49e877415c07debeb /doc/mkhtml.py | |
| parent | 21b434e4a04b5326ad0e57c6a2c774c415afe066 (diff) | |
| download | python-lxml-48923a15e2a6650fd0256ed17ae0787ac87b1658.tar.gz | |
[svn r2136] some more cleanup
--HG--
branch : trunk
Diffstat (limited to 'doc/mkhtml.py')
| -rw-r--r-- | doc/mkhtml.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/mkhtml.py b/doc/mkhtml.py index 429a7afb..821f48e1 100644 --- a/doc/mkhtml.py +++ b/doc/mkhtml.py @@ -66,10 +66,11 @@ def merge_menu(tree, menu, name): if tag[0] != '{': el.tag = "{http://www.w3.org/1999/xhtml}" + tag current_submenu = find_submenu(menu_root, name=name) - for submenu in current_submenu: - submenu.set("style", "") + if current_submenu: + for submenu in current_submenu: + submenu.set("style", "") else: - print "No menu found for", name + print "No menu found in", name return tree def rest2html(script, source_path, dest_path, stylesheet_url): @@ -96,6 +97,8 @@ def publish(dirname, lxml_path, release): for filename in text_files: path = os.path.join(doc_dir, filename) basename = os.path.splitext(filename)[0] + if basename == 'main': + basename = 'index' outname = basename + '.html' outpath = os.path.join(dirname, outname) @@ -121,8 +124,5 @@ def publish(dirname, lxml_path, release): os.path.join(dirname, 'changes-%s.html' % release), stylesheet_url) - os.rename(os.path.join(dirname, 'main.html'), - os.path.join(dirname, 'index.html')) - if __name__ == '__main__': publish(sys.argv[1], sys.argv[2], sys.argv[3]) |
