diff options
| author | Georg Brandl <georg@python.org> | 2008-11-04 08:41:42 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2008-11-04 08:41:42 +0100 |
| commit | 499fdf51ac58975d258cd601e1be9486e66663dc (patch) | |
| tree | ab886c3c1555ab7890e11383bf3d7533257e87eb /sphinx/builder.py | |
| parent | 3d2af2e3c655e794cd7ec253294cda84fded43fa (diff) | |
| download | sphinx-499fdf51ac58975d258cd601e1be9486e66663dc.tar.gz | |
Don't generate HTML modindex if no modules are present.
Diffstat (limited to 'sphinx/builder.py')
| -rw-r--r-- | sphinx/builder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/builder.py b/sphinx/builder.py index b3e36b45..eaaaaf1a 100644 --- a/sphinx/builder.py +++ b/sphinx/builder.py @@ -425,7 +425,7 @@ class StandaloneHTMLBuilder(Builder): rellinks = [] if self.config.html_use_index: rellinks.append(('genindex', _('General Index'), 'I', _('index'))) - if self.config.html_use_modindex: + if self.config.html_use_modindex and self.env.modules: rellinks.append(('modindex', _('Global Module Index'), 'M', _('modules'))) self.globalcontext = dict( @@ -559,7 +559,7 @@ class StandaloneHTMLBuilder(Builder): # the global module index - if self.config.html_use_modindex: + if self.config.html_use_modindex and self.env.modules: # the sorted list of all modules, for the global module index modules = sorted(((mn, (self.get_relative_uri('modindex', fn) + '#module-' + mn, sy, pl, dep)) |
