From 185642fe4ae574eb239b91e4795d0659be3d89ed Mon Sep 17 00:00:00 2001 From: Alex Iribarren Date: Wed, 14 Jul 2021 12:11:02 +0200 Subject: [PATCH] OzException has no attribute 'message' --- imagefactory_plugins/IndirectionCloud/IndirectionCloud.py | 2 +- imagefactory_plugins/TinMan/TinMan.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imagefactory_plugins/IndirectionCloud/IndirectionCloud.py b/imagefactory_plugins/IndirectionCloud/IndirectionCloud.py index ff364db8..4418c63a 100644 --- a/imagefactory_plugins/IndirectionCloud/IndirectionCloud.py +++ b/imagefactory_plugins/IndirectionCloud/IndirectionCloud.py @@ -302,7 +302,7 @@ def _init_oz(self): except libvirtError as e: raise ImageFactoryException("Cannot connect to libvirt. Make sure libvirt is running. [Original message: %s]" % e.message) except OzException as e: - if "Unsupported" in e.message: + if "Unsupported" in str(e): raise ImageFactoryException("TinMan plugin does not support distro (%s) update (%s) in TDL" % (self.tdlobj.distro, self.tdlobj.update) ) else: raise e diff --git a/imagefactory_plugins/TinMan/TinMan.py b/imagefactory_plugins/TinMan/TinMan.py index 219a78e4..363ae7a5 100644 --- a/imagefactory_plugins/TinMan/TinMan.py +++ b/imagefactory_plugins/TinMan/TinMan.py @@ -406,7 +406,7 @@ def init_guest(self): except libvirtError as e: raise ImageFactoryException("Cannot connect to libvirt. Make sure libvirt is running. [Original message: %s]" % e.message) except OzException as e: - if "Unsupported" in e.message: + if "Unsupported" in str(e): raise ImageFactoryException("TinMan plugin does not support distro (%s) update (%s) in TDL" % (self.tdlobj.distro, self.tdlobj.update) ) else: raise e