Fix create MacOS plist file
This commit is contained in:
@@ -55,16 +55,16 @@ def set_startup():
|
|||||||
except OSError:
|
except OSError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
with open(plist_file_path, 'wb') as f:
|
with open(plist_file_path, 'wb') as f:
|
||||||
try:
|
try:
|
||||||
plistlib.dump(plist_dict, f)
|
plistlib.dump(plist_dict, f)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
plistlib.writePlist(plist_dict, f)
|
plistlib.writePlist(plist_dict, f)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
logger.error("Failed to create MacOS system startup plist file: %s", e)
|
logger.error("Failed to create MacOS system startup plist file: %s", e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user