Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add attribute check for toolchainopts documentation #1839

Merged
merged 3 commits into from
Jul 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions easybuild/tools/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,19 +564,19 @@ def avail_toolchain_opts(name, output_format=FORMAT_TXT):
raise EasyBuildError("Couldn't find toolchain: '%s'. To see available toolchains, use --list-toolchains" % name)
tc = tc_class(version='1.0') # version doesn't matter here, but needs to be defined

options = [tc.COMPILER_SHARED_OPTS, tc.COMPILER_UNIQUE_OPTS, tc.MPI_SHARED_OPTS, tc.MPI_UNIQUE_OPTS]

tc_dict = {}
for opt in options:
if opt is not None:
tc_dict.update(opt)
for cst in ['COMPILER_SHARED_OPTS', 'COMPILER_UNIQUE_OPTS', 'MPI_SHARED_OPTS', 'MPI_UNIQUE_OPTS']:
if hasattr(tc, cst):
opts = getattr(tc, cst)
if opts is not None:
tc_dict.update(opts)

return generate_doc('avail_toolchain_opts_%s' % output_format, [name, tc_dict])


def avail_toolchain_opts_rst(name, tc_dict):
""" Returns overview of toolchain options in rst format """
title = "Available options for %s toolchain:" % name
title = "Available options for %s toolchain" % name

table_titles = ['option', 'description', 'default']

Expand Down