From 8a18fa6c2f78a198f15e8680eacca593ccef2c94 Mon Sep 17 00:00:00 2001 From: Arksine Date: Wed, 6 Jan 2021 09:09:29 -0500 Subject: [PATCH] confighelper: Add method to write config to a file object Signed-off-by: Eric Callahan --- moonraker/confighelper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moonraker/confighelper.py b/moonraker/confighelper.py index 79dc521..f110241 100644 --- a/moonraker/confighelper.py +++ b/moonraker/confighelper.py @@ -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))