diff options
author | Stephen McDowell <svenevs@users.noreply.github.com> | 2020-04-05 15:08:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 14:08:13 -0500 |
commit | 51fbe518b8d7400d4df806ad9c60edcb83510e4b (patch) | |
tree | 11c07e6582c6b657e53d7032d75450d696853de3 /lib | |
parent | 34627fcbe55c19357dc99a5106045106160681ce (diff) | |
download | spack-51fbe518b8d7400d4df806ad9c60edcb83510e4b.tar.gz spack-51fbe518b8d7400d4df806ad9c60edcb83510e4b.tar.bz2 spack-51fbe518b8d7400d4df806ad9c60edcb83510e4b.tar.xz spack-51fbe518b8d7400d4df806ad9c60edcb83510e4b.zip |
verify `other.exe` attr exists before use in __eq__ (#15882)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/executable.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index ce30e18f42..1f5fdfb761 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -209,7 +209,7 @@ class Executable(object): istream.close() def __eq__(self, other): - return self.exe == other.exe + return hasattr(other, 'exe') and self.exe == other.exe def __neq__(self, other): return not (self == other) |