Changeset 96968 in vbox for trunk/src/VBox/ValidationKit/common
- Timestamp:
- Oct 3, 2022 1:55:00 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/common/utils.py
r96407 r96968 266 266 pass; 267 267 268 elif sOs == 'darwin': 269 sOsxVersion = platform.mac_ver()[0]; 270 codenames = {"4": "Tiger", 271 "5": "Leopard", 272 "6": "Snow Leopard", 273 "7": "Lion", 274 "8": "Mountain Lion", 275 "9": "Mavericks", 276 "10": "Yosemite", 277 "11": "El Capitan", 278 "12": "Sierra", 279 "13": "High Sierra", 280 "14": "Mojave", 281 "15": "Catalina", 282 "16": "Unknown 16", 283 "17": "Unknown 17", 284 "18": "Unknown 18", 285 "19": "Unknown 19", } 286 sVersion += ' / OS X ' + sOsxVersion + ' (' + codenames[sOsxVersion.split('.')[1]] + ')' 268 elif sOs == 'darwin':` 269 def getMacVersionName(sVersion): 270 aOsVersion = sVersion.split('.') # example: ('10','15','7') 271 codenames = {"4": "Tiger", 272 "5": "Leopard", 273 "6": "Snow Leopard", 274 "7": "Lion", 275 "8": "Mountain Lion", 276 "9": "Mavericks", 277 "10": "Yosemite", 278 "11": "El Capitan", 279 "12": "Sierra", 280 "13": "High Sierra", 281 "14": "Mojave", 282 "15": "Catalina", 283 "16": "Wrong version", 284 } 285 codenames_afterCatalina = {"11": "Big Sur", 286 "12": "Monterey", 287 "13": "Ventura", 288 "14": "Unknown 15", 289 "15": "Unknown 16"} 290 print(sVersion) 291 if aOsVersion[0] == '10': 292 return codenames[aOsVersion[1]] 293 else: 294 return codenames_afterCatalina[aOsVersion[0]] 295 296 sOsxVersion = platform.mac_ver()[0] 297 sVersion += ' / OS X ' + sOsxVersion + ' (' + getMacVersionName(sOsxVersion) + ')' 287 298 288 299 elif sOs == 'win':
Note:
See TracChangeset
for help on using the changeset viewer.