Fix the suffix in the module name which is used when logging messages by
the actions.
Previously it was always incorrectly "ABCMeta" instead of the actual
action class name.
import os
import sys
+import inspect
# Note: This work-around is required to fix the issue with other Python modules which live
# inside this directory polluting and masking sys.path for Python runner actions.
@@ -216,7 +217,10 @@ class PythonActionWrapper(object):
raise Exception('File "%s" has no action class or the file doesn\'t exist.' %
(self._file_path))
- self._class_name = action_cls.__class__.__name__
+ # Note: We need to use inspect.mro because action_cls.__class__ actually points tothe
+ # parent class (ABCMeta)
+ action_class = inspect.getmro(action_cls)[0]
+ self._class_name = action_class.__name__
action_service = ActionService(action_wrapper=self)
action_instance = get_action_class_instance(action_cls=action_cls,
