[Mesa-dev] [PATCH mesa 2/6] scons: use python3-compatible list-key check

Eric Engestrom eric.engestrom at imgtec.com
Tue Sep 19 14:14:51 UTC 2017


Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 scons/gallium.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index db7764544145accaacf9..9772eb32bf271de6f358 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -193,15 +193,15 @@ def generate(env):
     env.Tool(env['toolchain'])
 
     # Allow override compiler and specify additional flags from environment
-    if os.environ.has_key('CC'):
+    if 'CC' in os.environ:
         env['CC'] = os.environ['CC']
-    if os.environ.has_key('CFLAGS'):
+    if 'CFLAGS' in os.environ:
         env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
-    if os.environ.has_key('CXX'):
+    if 'CXX' in os.environ:
         env['CXX'] = os.environ['CXX']
-    if os.environ.has_key('CXXFLAGS'):
+    if 'CXXFLAGS' in os.environ:
         env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
-    if os.environ.has_key('LDFLAGS'):
+    if 'LDFLAGS' in os.environ:
         env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
 
     # Detect gcc/clang not by executable name, but through pre-defined macros
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list