settings.py: Added possibility to leave path unfilled in save()
This commit is contained in:
parent
825322d000
commit
9f8c4ce1a7
1 changed files with 4 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue