Add custom motd

This commit is contained in:
VirtuBox
2019-10-27 21:08:50 +01:00
parent 2867de7ff1
commit d7cd99f1e8
3 changed files with 59 additions and 1 deletions

View File

@@ -343,3 +343,16 @@ class WOFileUtils():
# If it's not a symlink we're not interested.
continue
return True
def writein(self, path, content):
"""
Write content in path
"""
Log.debug(self, "Writing content in {0}".format(path))
try:
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))
Log.error(self, "Unable to write content in {0}".format(path))