Skip to content

Commit 27ad214

Browse files
authored
Merge pull request #759 from moreati/callback_me_maybe
tests: Fix AttributeError in callback plugins used by test suite
2 parents 5942bfb + 79b4c0f commit 27ad214

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

docs/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ To avail of fixes in an unreleased version, please download a ZIP file
2323

2424
* :gh:issue:`756` ssh connections with `check_host_keys='accept'` would
2525
timeout, when using recent OpenSSH client versions.
26+
* :gh:issue:`758` fix initilialisation of callback plugins in test suite, to
27+
to address a `KeyError` in
28+
:method:`ansible.plugins.callback.CallbackBase.v2_runner_on_start`
2629

2730

2831
v0.2.9 (2019-11-02)

tests/ansible/lib/callback/nice_stdout.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
DOCUMENTATION = '''
2121
callback: nice_stdout
2222
type: stdout
23+
extends_documentation_fragment:
24+
- default_callback
2325
options:
2426
check_mode_markers:
2527
name: Show markers when running in check mode
@@ -74,6 +76,10 @@ def write(s, *args):
7476

7577

7678
class CallbackModule(DefaultModule):
79+
CALLBACK_VERSION = 2.0
80+
CALLBACK_TYPE = 'stdout'
81+
CALLBACK_NAME = 'nice_stdout'
82+
7783
def _dump_results(self, result, *args, **kwargs):
7884
try:
7985
tio = io.StringIO()

tests/ansible/lib/callback/profile_tasks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class CallbackModule(CallbackBase):
3737
A plugin for timing tasks
3838
"""
3939
def __init__(self):
40+
super(CallbackModule, self).__init__()
4041
self.stats = {}
4142
self.current = None
4243

0 commit comments

Comments
 (0)