Get macOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version). Entries which cannot be determined are set to the parameter values which default to ''. All tuple entr
(release='', versioninfo=('', '', ''), machine='')
| 434 | |
| 435 | |
| 436 | def mac_ver(release='', versioninfo=('', '', ''), machine=''): |
| 437 | |
| 438 | """ Get macOS version information and return it as tuple (release, |
| 439 | versioninfo, machine) with versioninfo being a tuple (version, |
| 440 | dev_stage, non_release_version). |
| 441 | |
| 442 | Entries which cannot be determined are set to the parameter values |
| 443 | which default to ''. All tuple entries are strings. |
| 444 | """ |
| 445 | |
| 446 | # First try reading the information from an XML file which should |
| 447 | # always be present |
| 448 | info = _mac_ver_xml() |
| 449 | if info is not None: |
| 450 | return info |
| 451 | |
| 452 | # If that also doesn't work return the default values |
| 453 | return release, versioninfo, machine |
| 454 | |
| 455 | def _java_getprop(name, default): |
| 456 |
no test coverage detected