diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-10 20:48:35 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-10 21:00:51 +0100 |
commit | 5d224daeebf27ad3b893f6255f235d29f90f7a9f (patch) | |
tree | 856ae4c386f8f9dba7c7e3321219ff90822b7484 /python/vyos | |
parent | 7ae854213536413362a8226f218d9219e6fe3869 (diff) | |
download | vyos-1x-5d224daeebf27ad3b893f6255f235d29f90f7a9f.tar.gz vyos-1x-5d224daeebf27ad3b893f6255f235d29f90f7a9f.zip |
ConfigError: T4068: automatically wrap message at 72 characters
(cherry picked from commit 4948380a588dea59a01e6e33b9b8e1524ba6a4ed)
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) |