From 6ac916ecd58cf1515dd5b9b47283d5528d0c265b Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 16 Sep 2020 11:24:16 -0500 Subject: configd: T2885: fix output of error string to config session --- src/services/vyos-configd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/services') diff --git a/src/services/vyos-configd b/src/services/vyos-configd index 579605e8c..642952936 100755 --- a/src/services/vyos-configd +++ b/src/services/vyos-configd @@ -111,6 +111,7 @@ def explicit_print(t, m): try: with open(t, 'w') as f: f.write(m) + f.write("\n") f.flush() except Exception: pass @@ -124,7 +125,7 @@ def run_script(script, config) -> int: script.apply(c) except ConfigError as e: logger.critical(e) - explicit_print(session_tty, e) + explicit_print(session_tty, str(e)) return R_ERROR_COMMIT except Exception: return R_ERROR_DAEMON @@ -132,6 +133,7 @@ def run_script(script, config) -> int: return R_SUCCESS def initialization(socket): + global session_tty # Reset config strings: active_string = '' session_string = '' -- cgit v1.2.3