diff options
-rw-r--r-- | lib/spack/spack/package.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 10f4606972..690ce075cb 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1252,18 +1252,14 @@ class PackageBase(six.with_metaclass(PackageMeta, PackageViewMixin, object)): Returns: True if the package has been installed, False otherwise. """ - has_prefix = os.path.isdir(self.prefix) try: # If the spec is in the DB, check the installed # attribute of the record - rec = spack.store.db.get_record(self.spec) - db_says_installed = rec.installed + return spack.store.db.get_record(self.spec).installed except KeyError: # If the spec is not in the DB, the method # above raises a Key error - db_says_installed = False - - return has_prefix and db_says_installed + return False @property def prefix(self): |