Fetch the macOS system preferences.
()
| 83 | |
| 84 | |
| 85 | def readSystemPreferences(): |
| 86 | """ |
| 87 | Fetch the macOS system preferences. |
| 88 | """ |
| 89 | if platform != 'darwin': |
| 90 | return None |
| 91 | |
| 92 | plist_path = expanduser('~/Library/Preferences/.GlobalPreferences.plist') |
| 93 | try: |
| 94 | with open(plist_path, 'rb') as plist_file: |
| 95 | return plistlib.load(plist_file) |
| 96 | except OSError: |
| 97 | return None |
| 98 | |
| 99 | |
| 100 | def preferTabsPreferenceWarning(): |
no test coverage detected
searching dependent graphs…