Switch to bug fix build

0.5.0 will be held off for Ventura support
This commit is contained in:
Mykola Grymalyuk
2022-06-14 09:40:36 -06:00
parent 2798d8a676
commit f9c14459be
3 changed files with 11 additions and 4 deletions

View File

@@ -18,7 +18,10 @@ class global_settings:
def generate_settings_file(self):
if Path(self.global_settings_plist).exists():
return
plistlib.dump({"Developed by Dortania": True,}, Path(self.global_settings_plist).open("wb"))
try:
plistlib.dump({"Developed by Dortania": True,}, Path(self.global_settings_plist).open("wb"))
except PermissionError:
print("- Permission error: Unable to write to global settings file")
def read_property(self, property_name):
if Path(self.global_settings_plist).exists():
@@ -31,7 +34,10 @@ class global_settings:
if Path(self.global_settings_plist).exists():
plist = plistlib.load(Path(self.global_settings_plist).open("rb"))
plist[property_name] = property_value
plistlib.dump(plist, Path(self.global_settings_plist).open("wb"))
try:
plistlib.dump(plist, Path(self.global_settings_plist).open("wb"))
except PermissionError:
print("- Failed to write to global settings file")
def convert_defaults_to_global_settings(self):