Simply return the system version
()
| 1191 | ParsePackagesDir(os.path.join(ROOT_PATH, 'Applications')) |
| 1192 | |
| 1193 | def GetAuditedSystemVersion(): |
| 1194 | ''' Simply return the system version ''' |
| 1195 | |
| 1196 | global OSX_VERSION |
| 1197 | |
| 1198 | SysVersion = 'Unknown system version' |
| 1199 | SystemVersionPlist = False |
| 1200 | |
| 1201 | SystemVersionPlist = UniversalReadPlist('/System/Library/CoreServices/SystemVersion.plist') |
| 1202 | |
| 1203 | if SystemVersionPlist: |
| 1204 | if 'ProductName' in SystemVersionPlist: SysVersion = SystemVersionPlist['ProductName'] |
| 1205 | if 'ProductVersion' in SystemVersionPlist: SysVersion += ' ' + SystemVersionPlist['ProductVersion'] |
| 1206 | if 'ProductBuildVersion' in SystemVersionPlist: SysVersion += ' build ' + SystemVersionPlist['ProductBuildVersion'] |
| 1207 | |
| 1208 | ProductVersion = SystemVersionPlist['ProductVersion'].split('.') |
| 1209 | |
| 1210 | OSX_VERSION = { |
| 1211 | 'ProductBuildVersion': SystemVersionPlist['ProductBuildVersion'], |
| 1212 | 'ProductVersion': SystemVersionPlist['ProductVersion'], |
| 1213 | 'MajorVersion': int(ProductVersion[0]), |
| 1214 | 'MinorVersion': int(ProductVersion[1]), |
| 1215 | 'PatchVersion': int(ProductVersion[2] if len(ProductVersion) > 2 else 0) |
| 1216 | } |
| 1217 | |
| 1218 | else: |
| 1219 | PrintAndLog(u'Cannot determine the system version', 'ERROR') |
| 1220 | |
| 1221 | return SysVersion |
| 1222 | |
| 1223 | |
| 1224 | def GetAuditedSystemTimezone(): |
no test coverage detected