From 9f8c4ce1a728f08a7262c43715e77b7268e0506b Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Sun, 5 Nov 2023 19:08:12 +0100 Subject: [PATCH] settings.py: Added possibility to leave path unfilled in save() --- settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/settings.py b/settings.py index 70817cf..8bbdea3 100644 --- a/settings.py +++ b/settings.py @@ -16,7 +16,10 @@ class Settings: self.settings = eval(file.read()) file.close() - def save(self, path): + def save(self, path: str=None): + if path is None: + path = self.path + file = open(path, "w") file.write(str(self)) file.close()