settings.py: Added possibility to leave path unfilled in save()

This commit is contained in:
The Wobbler 2023-11-05 19:08:12 +01:00
parent 825322d000
commit 9f8c4ce1a7

View file

@ -16,7 +16,10 @@ class Settings:
self.settings = eval(file.read()) self.settings = eval(file.read())
file.close() file.close()
def save(self, path): def save(self, path: str=None):
if path is None:
path = self.path
file = open(path, "w") file = open(path, "w")
file.write(str(self)) file.write(str(self))
file.close() file.close()