spack compiler info: quick fix for failing command (#14928)

fixes #14927
This commit is contained in:
Massimiliano Culpo 2020-02-14 03:32:55 +01:00 committed by GitHub
parent c607288a7c
commit 8c05221bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,7 +142,7 @@ def compiler_info(args):
for flag, flag_value in iteritems(c.flags):
print("\t\t%s = %s" % (flag, flag_value))
if len(c.environment) != 0:
if len(c.environment['set']) != 0:
if len(c.environment.get('set', {})) != 0:
print("\tenvironment:")
print("\t set:")
for key, value in iteritems(c.environment['set']):