summaryrefslogtreecommitdiff
path: root/src/conf_mode/service_console-server.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/service_console-server.py')
-rwxr-xr-xsrc/conf_mode/service_console-server.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/conf_mode/service_console-server.py b/src/conf_mode/service_console-server.py
index 613ec6879..0e5fc75b0 100755
--- a/src/conf_mode/service_console-server.py
+++ b/src/conf_mode/service_console-server.py
@@ -27,8 +27,11 @@ from vyos import ConfigError
config_file = r'/run/conserver/conserver.cf'
-def get_config():
- conf = Config()
+def get_config(config=None):
+ if config:
+ conf = config
+ else:
+ conf = Config()
base = ['service', 'console-server']
# Retrieve CLI representation as dictionary