Revert "Set permissions when writing files, log less data"

This reverts commit e2f8951940.
This commit is contained in:
VirtuBox
2024-05-29 02:07:08 +02:00
parent 7411c3f387
commit 36aa70fb52
3 changed files with 11 additions and 7 deletions

View File

@@ -342,14 +342,14 @@ class WOFileUtils():
continue
return True
def textwrite(self, path, content, perm="0o644"):
def textwrite(self, path, content):
"""
Write content into a file
"""
Log.debug(self, "Writing content in {0}".format(path))
try:
with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT, perm),
'w', encoding='utf-8') as final_file:
with open("{0}".format(path),
encoding='utf-8', mode='w') as final_file:
final_file.write('{0}'.format(content))
except IOError as e:
Log.debug(self, "{0}".format(e))