Fix create MacOS plist file

This commit is contained in:
JonnyWong16 2020-04-25 12:36:50 -07:00
parent d779e72bcd
commit 773ee8664c
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -55,16 +55,16 @@ def set_startup():
except OSError:
return False
with open(plist_file_path, 'wb') as f:
try:
plistlib.dump(plist_dict, f)
except AttributeError:
plistlib.writePlist(plist_dict, f)
except OSError as e:
logger.error("Failed to create MacOS system startup plist file: %s", e)
return False
with open(plist_file_path, 'wb') as f:
try:
plistlib.dump(plist_dict, f)
except AttributeError:
plistlib.writePlist(plist_dict, f)
except OSError as e:
logger.error("Failed to create MacOS system startup plist file: %s", e)
return False
return True
return True
else:
try: