confighelper: Add method to write config to a file object

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-01-06 09:09:29 -05:00
parent 4cd97d61f9
commit 8a18fa6c2f
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ class ConfigHelper:
except Exception:
raise ConfigError(f"Error Reading Config: '{cfg_file_path}'")
def write_config(self, file_obj):
self.config.write(file_obj)
def get_configuration(server, system_args):
cfg_file_path = os.path.normpath(os.path.expanduser(
system_args.configfile))