diff options
-rw-r--r-- | lib/spack/spack/operating_systems/mac_osx.py | 9 | ||||
-rw-r--r-- | lib/spack/spack/platforms/darwin.py | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/spack/spack/operating_systems/mac_osx.py b/lib/spack/spack/operating_systems/mac_osx.py index a9de03d2cc..3cf9b4e12e 100644 --- a/lib/spack/spack/operating_systems/mac_osx.py +++ b/lib/spack/spack/operating_systems/mac_osx.py @@ -21,9 +21,8 @@ class MacOsx(OperatingSystem): "10.11": "elcapitan"} mac_ver = py_platform.mac_ver()[0][:-2] - try: - name = mac_releases[mac_ver] - except KeyError: - name = "mac_os" - + name = mac_releases.get(mac_ver, "mac_osx") super(MacOsx, self).__init__(name, mac_ver) + + def __str__(self): + return self.name diff --git a/lib/spack/spack/platforms/darwin.py b/lib/spack/spack/platforms/darwin.py index 7901f82d06..8c8af83d55 100644 --- a/lib/spack/spack/platforms/darwin.py +++ b/lib/spack/spack/platforms/darwin.py @@ -13,11 +13,11 @@ class Darwin(Platform): self.add_target(self.default, Target(self.default)) mac_os = MacOsx() - self.default_os = mac_os.name - self.front_os = mac_os.name - self.back_os = mac_os.name + self.default_os = str(mac_os) + self.front_os = str(mac_os) + self.back_os = str(mac_os) - self.add_operating_system(mac_os.name, mac_os) + self.add_operating_system(str(mac_os), mac_os) @classmethod def detect(self): |