not == to !=

Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
This commit is contained in:
Todd Gamblin 2025-04-09 11:18:43 -07:00
parent b14f172a61
commit 56c947722e
No known key found for this signature in database
GPG Key ID: C16729F1AACF66C6

View File

@ -50,7 +50,7 @@ def find_python_in_prefix(spec: "spack.spec.Spec", prefix: Optional[str] = None)
Executable: the Python command
"""
if not spec.name == "python":
if spec.name != "python":
raise ValueError("find_python_in_prefix() only works on Python installations.")
prefix = Prefix(prefix or spec.prefix)