Fixed path issues

This commit is contained in:
Remy Moll 2020-12-10 11:36:43 +01:00
parent bfd087a0a6
commit cd13cea967
2 changed files with 5 additions and 6 deletions

View File

@ -245,7 +245,7 @@ class ChatBot():
self.persistence.write("log",[]) self.persistence.write("log",[])
return "Log cleared" return "Log cleared"
elif "system" in args: elif "system" in args:
send_text = self.persistence.read_ext_file("log.txt") send_text = self.persistence.read_ext_file("persistence/log.txt")
return send_text return send_text
send_text = "" send_text = ""

View File

@ -77,8 +77,7 @@ class Variables():
"""returns content of given file""" """returns content of given file"""
if not os.path.exists(path): if not os.path.exists(path):
return "File does not exist" return "File does not exist"
file = os.open(path,"r") file = open(path,"r")
print(os.getcwd()) content = file.read()
content = os.read(file) file.close()
os.close(file)
return content return content