mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Refactor method name
This commit is contained in:
parent
c3a6562626
commit
110a9405a7
1 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ class FormConfigs:
|
|||
|
||||
def help(self):
|
||||
""" Load the configuration file on a text box. """
|
||||
self.read_file()
|
||||
self.read_config()
|
||||
self.dialog.textbox(str(self.config_file), 40, 60)
|
||||
self.edit()
|
||||
|
||||
|
@ -70,14 +70,14 @@ class FormConfigs:
|
|||
return False
|
||||
return True
|
||||
|
||||
def read_file(self):
|
||||
def read_config(self):
|
||||
""" Read the original config file. """
|
||||
with open(self.config_file, 'r') as toml_file:
|
||||
self.orig_configs = toml_file.readlines()
|
||||
|
||||
def write_file(self, configs: dict, tags: list):
|
||||
""" Write the new values to the config file. """
|
||||
self.read_file()
|
||||
self.read_config()
|
||||
with open(self.config_file, 'w') as patch_toml:
|
||||
for line in self.orig_configs:
|
||||
for key, value in zip(configs['configs'].keys(), tags):
|
||||
|
|
Loading…
Reference in a new issue