From 2bd04cd72d77662c3da965eac48ec4c8ed32ee5d Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 11 Dec 2024 21:04:08 +0100 Subject: [PATCH] fix: specialize error --- src/rougail/user_data_ansible/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rougail/user_data_ansible/__init__.py b/src/rougail/user_data_ansible/__init__.py index ae545e3..26766b5 100644 --- a/src/rougail/user_data_ansible/__init__.py +++ b/src/rougail/user_data_ansible/__init__.py @@ -22,6 +22,7 @@ from ansible.module_utils._text import to_bytes from rougail import RougailConfig from rougail.user_data_file import RougailUserDataFile +from rougail.error import ExtentionError from .i18n import _ @@ -43,7 +44,7 @@ class RougailUserDataAnsible(RougailUserDataFile): rougailconfig["step.user_data"] = user_data user_data = rougailconfig["step.user_data"] if "ansible" not in user_data: - raise Exception(_("ansible is not set in step.user_data")) + raise ExtentionError(_("ansible is not set in step.user_data")) self.rougailconfig = rougailconfig self.filenames = self.rougailconfig["ansible.filename"] self.secret = self.rougailconfig["ansible.secret"]