summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-06-19 20:40:54 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-06-26 15:38:41 -0500
commit83ca4a5a6ed042ee10881a861ba022e3b88b6de2 (patch)
tree1c92e6d7ba8749f4900b707d4977e5b3069810f1
parent8a57e7b14c818c93655819757d99b69747c9b2ca (diff)
downloadvyos-1x-83ca4a5a6ed042ee10881a861ba022e3b88b6de2.tar.gz
vyos-1x-83ca4a5a6ed042ee10881a861ba022e3b88b6de2.zip
migration: T6007: add exception in base for use by migration files
-rw-r--r--python/vyos/base.py7
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)