From 8c05221bc6b7dad8829b83d26402fcddf103719a Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 14 Feb 2020 03:32:55 +0100 Subject: [PATCH] spack compiler info: quick fix for failing command (#14928) fixes #14927 --- lib/spack/spack/cmd/compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index c9647898ef..625466f8c7 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -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']):