()
| 23584 | |
| 23585 | |
| 23586 | def _mac_should_set_alpha_to_99(): |
| 23587 | if not running_mac(): |
| 23588 | return False |
| 23589 | |
| 23590 | if not ENABLE_MAC_ALPHA_99_PATCH: |
| 23591 | return False |
| 23592 | |
| 23593 | # At this point, we're running a Mac and the alpha patch is enabled |
| 23594 | # Final check is to see if Mac OS version is 12.3 or later |
| 23595 | try: |
| 23596 | platform_mac_ver = platform.mac_ver()[0] |
| 23597 | mac_ver = platform_mac_ver.split('.') if '.' in platform_mac_ver else (platform_mac_ver, 0) |
| 23598 | if (int(mac_ver[0]) >= 12 and int(mac_ver[1]) >= 3) or int(mac_ver[0]) >= 13: |
| 23599 | # print("Mac OS Version is {} and patch enabled so applying the patch".format(platform_mac_ver)) |
| 23600 | return True |
| 23601 | except Exception as e: |
| 23602 | warnings.warn('_mac_should_seet_alpha_to_99 Exception while trying check mac_ver. Error = {}'.format(e), UserWarning) |
| 23603 | return False |
| 23604 | |
| 23605 | return False |
| 23606 | |
| 23607 | |
| 23608 | def main_mac_feature_control(): |
no test coverage detected