Skip to content

Commit 7367186

Browse files
itfAnthony Tran
authored andcommitted
[lldb] Add support for NoneType to decorator skipIfBuildType (llvm#145342)
Currently if cmake_build_type is None we error with `AttributeError: 'NoneType' object has no attribute 'lower'` if the decorator skipIfBuildType is used. This fixes the issue by first checking that cmake_build_type is not None.
1 parent d558d14 commit 7367186

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,7 @@ def skipIfBuildType(types: list[str]):
11551155
"""
11561156
types = [name.lower() for name in types]
11571157
return unittest.skipIf(
1158-
configuration.cmake_build_type.lower() in types,
1158+
configuration.cmake_build_type is not None
1159+
and configuration.cmake_build_type.lower() in types,
11591160
"skip on {} build type(s)".format(", ".join(types)),
11601161
)

0 commit comments

Comments
 (0)