You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/docs/docsite/rst/dev_guide/testing/sanity/no-main-display.rst

15 lines
382 B
ReStructuredText

no-main-display
===============
As of Ansible 2.8, ``Display`` should no longer be imported from ``__main__``.
``Display`` is now a singleton and should be utilized like the following:
.. code-block:: python
from ansible.utils.display import Display
display = Display()
There is no longer a need to attempt ``from __main__ import display`` inside
a ``try/except`` block.