summaryrefslogtreecommitdiff
path: root/python/vyos/base.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-10 20:48:35 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-10 20:48:35 +0100
commit4948380a588dea59a01e6e33b9b8e1524ba6a4ed (patch)
tree66ccd18a51a63cdccf33c97253e24aa897f87c97 /python/vyos/base.py
parent7f665a92b3ad3978b17153726de23c80ba97c4b7 (diff)
downloadvyos-1x-4948380a588dea59a01e6e33b9b8e1524ba6a4ed.tar.gz
vyos-1x-4948380a588dea59a01e6e33b9b8e1524ba6a4ed.zip
ConfigError: T4068: automatically wrap message at 72 characters
Diffstat (limited to 'python/vyos/base.py')
-rw-r--r--python/vyos/base.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/vyos/base.py b/python/vyos/base.py
index 4e23714e5..c78045548 100644
--- a/python/vyos/base.py
+++ b/python/vyos/base.py
@@ -1,4 +1,4 @@
-# Copyright 2018 VyOS maintainers and contributors <maintainers@vyos.io>
+# Copyright 2018-2021 VyOS maintainers and contributors <maintainers@vyos.io>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -13,6 +13,11 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
+from textwrap import fill
class ConfigError(Exception):
- pass
+ def __init__(self, message):
+ # Reformat the message and trim it to 72 characters in length
+ message = fill(message, width=72)
+ # Call the base class constructor with the parameters it needs
+ super().__init__(message)