Add some descriptive language to a list comprehension.

This commit is contained in:
Todd Gamblin 2016-03-09 11:26:37 -08:00
parent b43c277dc6
commit 45ef496dd5

View file

@ -51,6 +51,9 @@ def mpi_dependent_options(self):
'--with-mpi=0' '--with-mpi=0'
] ]
error_message_fmt = '\t{library} support requires "+mpi" to be activated' error_message_fmt = '\t{library} support requires "+mpi" to be activated'
# If mpi is disabled (~mpi), it's an error to have any of these enabled.
# This generates a list of any such errors.
errors = [error_message_fmt.format(library=x) errors = [error_message_fmt.format(library=x)
for x in ('hdf5', 'hypre', 'parmetis') for x in ('hdf5', 'hypre', 'parmetis')
if ('+'+x) in self.spec] if ('+'+x) in self.spec]