From 115e6f74ffa5119970457bcdd53bec13c49893b8 Mon Sep 17 00:00:00 2001 From: Alexei Znamensky Date: Mon, 20 Jan 2025 13:24:11 +1300 Subject: [PATCH] fix errors --- plugins/module_utils/mh/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/module_utils/mh/base.py b/plugins/module_utils/mh/base.py index f5639721a4a..cf054f59fd0 100644 --- a/plugins/module_utils/mh/base.py +++ b/plugins/module_utils/mh/base.py @@ -31,13 +31,13 @@ def __init__(self, module=None): # in 12.0.0 remove this if statement entirely if hasattr(self, 'debug'): - self.deprecate( - f"This class ({cls}) has an attribute 'debug' defined and that is deprecated. " + msg = ( + "This class ({cls}) has an attribute 'debug' defined and that is deprecated. " "Method 'debug' will be an integral part of ModuleHelper in community.general " "12.0.0, delegated to the underlying AnsibleModule object. " - "Please rename the existing attribute to prevent this message from showing.".format(cls=self.__class__.__name__), - version="12.0.0", collection="community.general" + "Please rename the existing attribute to prevent this message from showing.".format(cls=self.__class__.__name__) ) + self.deprecate(msg, version="12.0.0", collection_name="community.general") else: self._delegated_to_module = self._delegated_to_module + ('debug',)