diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-10 20:48:35 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-10 20:48:35 +0100 |
commit | 4948380a588dea59a01e6e33b9b8e1524ba6a4ed (patch) | |
tree | 66ccd18a51a63cdccf33c97253e24aa897f87c97 /python/vyos | |
parent | 7f665a92b3ad3978b17153726de23c80ba97c4b7 (diff) | |
download | vyos-1x-4948380a588dea59a01e6e33b9b8e1524ba6a4ed.tar.gz vyos-1x-4948380a588dea59a01e6e33b9b8e1524ba6a4ed.zip |
ConfigError: T4068: automatically wrap message at 72 characters
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/base.py | 9 |
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) |