Fix OS X version parsing/error related to OS X 10.10 update.

This commit is contained in:
Howard Hinnant
2014-10-20 21:55:57 -04:00
committed by Vinnie Falco
parent 65125eac87
commit 5b7f172d03
2 changed files with 7 additions and 3 deletions

View File

@@ -59,9 +59,10 @@ class __System(object):
self.__display = '%s %s (%s)' % (self.distro, self.version, self.name)
elif self.osx:
ten, major, minor = platform.mac_ver()[0].split('.')
self.__display = '%s %s.%s.%s' % (self.name, ten, major, minor)
parts = platform.mac_ver()[0].split('.')
while len(parts) < 3:
parts.append('0')
self.__display = '%s %s' % (self.name, '.'.join(parts))
elif self.windows:
release, version, csd, ptype = platform.win32_ver()
self.__display = '%s %s %s (%s)' % (self.name, release, version, ptype)

View File

@@ -41,6 +41,9 @@ namespace zsutil {
#define TYP_SMLE 1
#define TYP_BIGE 2
#undef htonll
#undef ntohll
uint64_t htonll(uint64_t src);
uint64_t ntohll(uint64_t src);