Skip to content

Commit

Permalink
[lldb] Use foo is None instead of not foo in darwin.py
Browse files Browse the repository at this point in the history
Explicitly compare to None when checking the triple's components so we
don't bail out when one of them is the empty string.
  • Loading branch information
JDevlieghere committed Jan 29, 2021
1 parent e5f258c commit b2545b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lldb/packages/Python/lldbsuite/test/builders/darwin.py
Expand Up @@ -43,12 +43,12 @@ def get_triple():

# Get the SDK from the os and env.
sdk = lldbutil.get_xcode_sdk(os, env)
if not sdk:
if sdk is None:
return None, None, None, None

# Get the version from the SDK.
version = lldbutil.get_xcode_sdk_version(sdk)
if not version:
if version is None:
return None, None, None, None

return vendor, os, version, env
Expand Down Expand Up @@ -86,7 +86,7 @@ def getArchCFlags(self, arch):
"""Returns the ARCH_CFLAGS for the make system."""
# Get the triple components.
vendor, os, version, env = get_triple()
if not vendor or not os or not version or not env:
if vendor is None or os is None or version is None or env is None:
return ""

# Construct the triple from its components.
Expand Down

0 comments on commit b2545b7

Please sign in to comment.