diff options
-rw-r--r-- | lldb/test/functionalities/tty/TestTerminal.py | 2 | ||||
-rw-r--r-- | lldb/test/plugins/builder_base.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lldb/test/functionalities/tty/TestTerminal.py b/lldb/test/functionalities/tty/TestTerminal.py index 8706a46736c..b0e47bbfa7b 100644 --- a/lldb/test/functionalities/tty/TestTerminal.py +++ b/lldb/test/functionalities/tty/TestTerminal.py @@ -25,7 +25,7 @@ class LaunchInTerminalTestCase(TestBase): @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0, "test cannot be run as root") # Do we need to disable this test if the testsuite is being run on a remote system? # This env var is only defined when the shell is running in a local mac terminal window - @unittest2.skipUnless(os.environ.has_key('TERM_PROGRAM'), "test must be run on local system") + @unittest2.skipUnless('TERM_PROGRAM' in os.environ, "test must be run on local system") @no_debug_info_test def test_launch_in_terminal (self): exe = "/bin/ls" diff --git a/lldb/test/plugins/builder_base.py b/lldb/test/plugins/builder_base.py index a2951175cbf..c0d5f2a30d5 100644 --- a/lldb/test/plugins/builder_base.py +++ b/lldb/test/plugins/builder_base.py @@ -82,7 +82,7 @@ def getCmdLine(d): def setOrAppendVariable(k, v): append_vars = ["CFLAGS_EXTRAS", "LD_EXTRAS"] - if k in append_vars and os.environ.has_key(k): + if k in append_vars and k in os.environ: v = os.environ[k] + " " + v return pattern % (k, v) cmdline = " ".join([setOrAppendVariable(k, v) for k, v in list(d.items())]) |