confighelper: Add method to write config to a file object
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
4cd97d61f9
commit
8a18fa6c2f
|
@ -83,6 +83,9 @@ class ConfigHelper:
|
||||||
except Exception:
|
except Exception:
|
||||||
raise ConfigError(f"Error Reading Config: '{cfg_file_path}'")
|
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):
|
def get_configuration(server, system_args):
|
||||||
cfg_file_path = os.path.normpath(os.path.expanduser(
|
cfg_file_path = os.path.normpath(os.path.expanduser(
|
||||||
system_args.configfile))
|
system_args.configfile))
|
||||||
|
|
Loading…
Reference in New Issue