fixes "Error: content" when calling write_to_file command

pull/10/head
Torantulino 2023-03-30 12:50:21 +01:00
parent aa6cb4cf81
commit 2a8f6abce8
1 changed files with 2 additions and 2 deletions

View File

@ -127,10 +127,10 @@ def overwrite_memory(key, string):
print("Invalid key, cannot overwrite memory.")
return None
def write_to_file(filename, content):
def write_to_file(filename, text):
try:
f = open(filename, "w")
f.write(content)
f.write(text)
f.close()
except Exception as e:
return "Error: " + str(e)