diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-08-10 22:13:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-10 22:13:11 +0200 |
| commit | 9502cdffa1c016f35c957a5d61f67b9bbd856cbe (patch) | |
| tree | f2e02a8252033ef18e7cfc97c8558ac9463f368b /python | |
| parent | f9a3c0cbb42c72fb0f48208cd24c1bf2c28e0afc (diff) | |
| parent | d28ce4499067b103565e0873e4677fd771962512 (diff) | |
| download | vyos-1x-9502cdffa1c016f35c957a5d61f67b9bbd856cbe.tar.gz vyos-1x-9502cdffa1c016f35c957a5d61f67b9bbd856cbe.zip | |
Merge pull request #5377 from l0crian1/better-fw-error-output
firewall: T7552: Output rule in verify_rule() ConfigError messages
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/base.py | 4 |
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) |
