Skip to content

Commit

Permalink
Merge pull request mitogen-hq#759 from moreati/callback_me_maybe
Browse files Browse the repository at this point in the history
tests: Fix AttributeError in callback plugins used by test suite
  • Loading branch information
s1113950 authored Nov 21, 2020
2 parents 5942bfb + 79b4c0f commit 27ad214
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ To avail of fixes in an unreleased version, please download a ZIP file

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


v0.2.9 (2019-11-02)
Expand Down
6 changes: 6 additions & 0 deletions tests/ansible/lib/callback/nice_stdout.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
DOCUMENTATION = '''
callback: nice_stdout
type: stdout
extends_documentation_fragment:
- default_callback
options:
check_mode_markers:
name: Show markers when running in check mode
Expand Down Expand Up @@ -74,6 +76,10 @@ def write(s, *args):


class CallbackModule(DefaultModule):
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'stdout'
CALLBACK_NAME = 'nice_stdout'

def _dump_results(self, result, *args, **kwargs):
try:
tio = io.StringIO()
Expand Down
1 change: 1 addition & 0 deletions tests/ansible/lib/callback/profile_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CallbackModule(CallbackBase):
A plugin for timing tasks
"""
def __init__(self):
super(CallbackModule, self).__init__()
self.stats = {}
self.current = None

Expand Down

0 comments on commit 27ad214

Please sign in to comment.