mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Finish up plugin porting to global display
Also remove display = display which does nothing
This commit is contained in:
@@ -37,7 +37,6 @@ from ansible.utils.unicode import to_unicode
|
||||
|
||||
try:
|
||||
from __main__ import display
|
||||
display = display
|
||||
except ImportError:
|
||||
from ansible.utils.display import Display
|
||||
display = Display()
|
||||
|
||||
@@ -39,7 +39,6 @@ from ansible.vars.unsafe_proxy import UnsafeProxy
|
||||
|
||||
try:
|
||||
from __main__ import display
|
||||
display = display
|
||||
except ImportError:
|
||||
from ansible.utils.display import Display
|
||||
display = Display()
|
||||
|
||||
@@ -35,7 +35,6 @@ from ansible.template import Templar
|
||||
|
||||
try:
|
||||
from __main__ import display
|
||||
display = display
|
||||
except ImportError:
|
||||
from ansible.utils.display import Display
|
||||
display = Display()
|
||||
@@ -161,11 +160,7 @@ class TaskQueueManager:
|
||||
elif callback_needs_whitelist and (C.DEFAULT_CALLBACK_WHITELIST is None or callback_name not in C.DEFAULT_CALLBACK_WHITELIST):
|
||||
continue
|
||||
|
||||
# is it too late to change the API for v2 callback plugins?
|
||||
# display is not necessary.
|
||||
self._callback_plugins.append(callback_plugin(display))
|
||||
else:
|
||||
self._callback_plugins.append(callback_plugin())
|
||||
self._callback_plugins.append(callback_plugin())
|
||||
|
||||
self._callbacks_loaded = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user