diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index c0813f191c8f..cacd718f7837 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -810,6 +810,6 @@ def skipUnlessFeature(feature): def skipIfSanitized(func): """Skip this test if the environment is set up to run LLDB itself under ASAN.""" def is_sanitized(): - return (('DYLD_INSERT_LIBRARIES' in os.env) and - 'libclang_rt.asan' in os.env['DYLD_INSERT_LIBRARIES']) + return (('DYLD_INSERT_LIBRARIES' in os.environ) and + 'libclang_rt.asan' in os.environ['DYLD_INSERT_LIBRARIES']) return skipTestIfFn(is_sanitized)(func)