Added str method to mac_osx so that whenever we try to access darwins different operating systems we can grab the name correctly. This avoids having to worry whether we have a version attached to it or not.
This commit is contained in:
parent
88b73bacdb
commit
6b03770602
2 changed files with 8 additions and 9 deletions
|
@ -21,9 +21,8 @@ def __init__(self):
|
||||||
"10.11": "elcapitan"}
|
"10.11": "elcapitan"}
|
||||||
|
|
||||||
mac_ver = py_platform.mac_ver()[0][:-2]
|
mac_ver = py_platform.mac_ver()[0][:-2]
|
||||||
try:
|
name = mac_releases.get(mac_ver, "mac_osx")
|
||||||
name = mac_releases[mac_ver]
|
|
||||||
except KeyError:
|
|
||||||
name = "mac_os"
|
|
||||||
|
|
||||||
super(MacOsx, self).__init__(name, mac_ver)
|
super(MacOsx, self).__init__(name, mac_ver)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
|
@ -13,11 +13,11 @@ def __init__(self):
|
||||||
self.add_target(self.default, Target(self.default))
|
self.add_target(self.default, Target(self.default))
|
||||||
mac_os = MacOsx()
|
mac_os = MacOsx()
|
||||||
|
|
||||||
self.default_os = mac_os.name
|
self.default_os = str(mac_os)
|
||||||
self.front_os = mac_os.name
|
self.front_os = str(mac_os)
|
||||||
self.back_os = mac_os.name
|
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
|
@classmethod
|
||||||
def detect(self):
|
def detect(self):
|
||||||
|
|
Loading…
Reference in a new issue