diff options
author | Erik Skultety <eskultet@redhat.com> | 2022-07-22 14:06:52 +0200 |
---|---|---|
committer | Erik Skultety <eskultet@redhat.com> | 2022-07-22 14:06:52 +0200 |
commit | a98357cf6c733cd8d0ebe8ab08dc951d60e202b6 (patch) | |
tree | 6459e1dbd5e0721cf0571625681ccb93cf5ae789 | |
parent | 324355cf62e86fb551408575afb123bac989ac37 (diff) | |
download | libvirt-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.py | 9 |
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(): |