summaryrefslogtreecommitdiff
path: root/lib/spack/docs/conf.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-05-12 22:19:11 -0700
committerscheibelp <scheibel1@llnl.gov>2018-05-17 14:10:30 -0700
commit3493f7e793e5bf5fdc0c51978ea476185025c192 (patch)
tree5ae0a5fed870501a2f3b8029f51ba7ffda2d0a47 /lib/spack/docs/conf.py
parent1fe5dbf338ed2d937a22cb32d75fb599dd00abf3 (diff)
downloadspack-3493f7e793e5bf5fdc0c51978ea476185025c192.tar.gz
spack-3493f7e793e5bf5fdc0c51978ea476185025c192.tar.bz2
spack-3493f7e793e5bf5fdc0c51978ea476185025c192.tar.xz
spack-3493f7e793e5bf5fdc0c51978ea476185025c192.zip
init: make spack.cmd.all_commands lazy
- `spack.cmd.all_commands` does a directory listing on `lib/spack/spack/cmd`, regardless of whether it is needed - make this lazy so that the directory listing won't happen unless it's necessary.
Diffstat (limited to 'lib/spack/docs/conf.py')
-rw-r--r--lib/spack/docs/conf.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index c269c7ee27..0b664eb5c0 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -77,7 +77,8 @@ with open('package_list.html', 'w') as plist_file:
# Find all the `cmd-spack-*` references and add them to a command index
#
import spack
-command_names = spack.cmd.all_commands
+import spack.cmd
+command_names = spack.cmd.all_commands()
documented_commands = set()
for filename in glob('*rst'):
with open(filename) as f: