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 entries a
(release='', versioninfo=('', '', ''), machine='')
| 494 | |
| 495 | |
| 496 | def mac_ver(release='', versioninfo=('', '', ''), machine=''): |
| 497 | |
| 498 | """ Get macOS version information and return it as tuple (release, |
| 499 | versioninfo, machine) with versioninfo being a tuple (version, |
| 500 | dev_stage, non_release_version). |
| 501 | |
| 502 | Entries which cannot be determined are set to the parameter values |
| 503 | which default to ''. All tuple entries are strings. |
| 504 | """ |
| 505 | |
| 506 | # First try reading the information from an XML file which should |
| 507 | # always be present |
| 508 | info = _mac_ver_xml() |
| 509 | if info is not None: |
| 510 | return info |
| 511 | |
| 512 | # If that also doesn't work return the default values |
| 513 | return release, versioninfo, machine |
| 514 | |
| 515 | |
| 516 | # A namedtuple for iOS version information. |
no test coverage detected
searching dependent graphs…