summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-06-19 20:40:54 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-09-11 11:10:01 -0500
commit309260f7eeb6d0d4033a1c058b60f2a69accbcd6 (patch)
tree5afadb7dc466def44e015b67c30a01903bdb0490 /python
parenta79237bb168e611d2965031479d0786b8380e438 (diff)
downloadvyos-1x-309260f7eeb6d0d4033a1c058b60f2a69accbcd6.tar.gz
vyos-1x-309260f7eeb6d0d4033a1c058b60f2a69accbcd6.zip
migration: T6007: add exception in base for use by migration files
(cherry picked from commit 83ca4a5a6ed042ee10881a861ba022e3b88b6de2)
Diffstat (limited to 'python')
-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)