summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorl0crian1 <ryan.claridge13@gmail.com>2026-08-04 13:17:54 -0400
committerl0crian1 <ryan.claridge13@gmail.com>2026-08-04 13:17:54 -0400
commitd28ce4499067b103565e0873e4677fd771962512 (patch)
treee19e4c59e5add5128e7b37e6c442f45b06f66d19 /python
parentf989055ecaeb3fcaa8931015fe51c230e8039d18 (diff)
downloadvyos-1x-d28ce4499067b103565e0873e4677fd771962512.tar.gz
vyos-1x-d28ce4499067b103565e0873e4677fd771962512.zip
T7552: Added more detail to error messages
Diffstat (limited to 'python')
-rw-r--r--python/vyos/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/base.py b/python/vyos/base.py
index 67f92564e..6b57eaf8e 100644
--- a/python/vyos/base.py
+++ b/python/vyos/base.py
@@ -64,8 +64,8 @@ class DeprecationWarning():
class ConfigError(Exception):
def __init__(self, message):
- # Reformat the message and trim it to 72 characters in length
- message = fill(message, width=72)
+ # Wrap each line separately so intentional newlines are preserved
+ message = '\n'.join(fill(line, width=72) for line in message.split('\n'))
# Call the base class constructor with the parameters it needs
super().__init__(message)