fixed permissions bug

pull/953/head
Michael Nguyen 2017-08-02 12:34:04 -05:00
parent cee542e3b3
commit c1041b9902
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,7 @@ def _write_data(dictionary):
if permission == "w+" and os.path.isdir(managerIPCDir) is False:
os.makedirs(managerIPCDir)
os.chmod(managerIPCDir, 0777)
try:
with open(path, permission) as dispFile:
@ -62,6 +63,8 @@ def _write_data(dictionary):
dispFile.write(json.dumps(data))
dispFile.truncate()
os.chmod(path, 0777)
except Exception as e:
LOG.error(e)
LOG.error("Error found in display manager file, deleting...")