You've already forked community.general
mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-29 07:41:16 +03:00
ModuleHelper: added a do_raise() method to MH base class (#4660)
* ModuleHelper: added a do_raise() method to MH base class * added changelog fragment * Update changelogs/fragments/4660-mh-added-do-raise.yaml Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/module_utils/mh/base.py Co-authored-by: Felix Fontein <felix@fontein.de> * using do_raise in CmdMixin * simplified do_raise() Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@ -31,6 +31,9 @@ class ModuleHelperBase(object):
|
||||
def diff_mode(self):
|
||||
return self.module._diff
|
||||
|
||||
def do_raise(self, *args, **kwargs):
|
||||
raise _MHE(*args, **kwargs)
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if attr in self._delegated_to_module:
|
||||
return getattr(self.module, attr)
|
||||
|
Reference in New Issue
Block a user