aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Skultety <eskultet@redhat.com>2022-07-22 14:06:52 +0200
committerErik Skultety <eskultet@redhat.com>2022-07-22 14:06:52 +0200
commita98357cf6c733cd8d0ebe8ab08dc951d60e202b6 (patch)
tree6459e1dbd5e0721cf0571625681ccb93cf5ae789
parent324355cf62e86fb551408575afb123bac989ac37 (diff)
downloadlibvirt-ci-a98357cf6c733cd8d0ebe8ab08dc951d60e202b6.zip
libvirt-ci-a98357cf6c733cd8d0ebe8ab08dc951d60e202b6.tar.gz
libvirt-ci-a98357cf6c733cd8d0ebe8ab08dc951d60e202b6.tar.bz2
libvirt_wrapper: exception: Inherit the LcitoolError exception
This was the only module that for some reason hasn't adopted the global custom exception type 'LcitoolError' we have and other modules already make use of. Signed-off-by: Erik Skultety <eskultet@redhat.com>
-rw-r--r--lcitool/libvirt_wrapper.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lcitool/libvirt_wrapper.py b/lcitool/libvirt_wrapper.py
index d8985a0..07ee5b5 100644
--- a/lcitool/libvirt_wrapper.py
+++ b/lcitool/libvirt_wrapper.py
@@ -10,12 +10,14 @@ import textwrap
import xml.etree.ElementTree as xmlparser
+from lcitool import LcitoolError
+
log = logging.getLogger(__name__)
LCITOOL_XMLNS = "http://libvirt.org/schemas/lcitool/1.0"
-class LibvirtWrapperError(Exception):
+class LibvirtWrapperError(LcitoolError):
"""
Global exception type for this module.
@@ -24,10 +26,7 @@ class LibvirtWrapperError(Exception):
"""
def __init__(self, message):
- self.message = message
-
- def __str__(self):
- return f"LibvirtWrapper error: {self.message}"
+ super().__init__(message, "LibvirtWrapper")
class LibvirtWrapper():