diff options
author | John Estabrook <jestabro@vyos.io> | 2024-06-19 20:40:54 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-06-26 15:38:41 -0500 |
commit | 83ca4a5a6ed042ee10881a861ba022e3b88b6de2 (patch) | |
tree | 1c92e6d7ba8749f4900b707d4977e5b3069810f1 /python/vyos/base.py | |
parent | 8a57e7b14c818c93655819757d99b69747c9b2ca (diff) | |
download | vyos-1x-83ca4a5a6ed042ee10881a861ba022e3b88b6de2.tar.gz vyos-1x-83ca4a5a6ed042ee10881a861ba022e3b88b6de2.zip |
migration: T6007: add exception in base for use by migration files
Diffstat (limited to 'python/vyos/base.py')
-rw-r--r-- | python/vyos/base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/vyos/base.py b/python/vyos/base.py index 054b1d837..ca96d96ce 100644 --- a/python/vyos/base.py +++ b/python/vyos/base.py @@ -63,3 +63,10 @@ class ConfigError(Exception): message = fill(message, width=72) # Call the base class constructor with the parameters it needs super().__init__(message) + +class MigrationError(Exception): + 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) |