mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Allow wrapped text in deprecated messages
This commit is contained in:
parent
5eb092b331
commit
d44daf53cc
1 changed files with 3 additions and 3 deletions
|
@ -161,11 +161,11 @@ class Display:
|
|||
else:
|
||||
raise AnsibleError("[DEPRECATED]: %s. Please update your playbooks." % msg)
|
||||
|
||||
wrapped = textwrap.wrap(new_msg, 79)
|
||||
new_msg = "\n".join(wrapped) + "\n"
|
||||
wrapped = textwrap.wrap(new_msg, 79, replace_whitespace=False, drop_whitespace=False)
|
||||
new_msg = "\n".join(wrapped)
|
||||
|
||||
if new_msg not in self._deprecations:
|
||||
self.display(new_msg, color='purple', stderr=True)
|
||||
self.display(new_msg.strip(), color='purple', stderr=True)
|
||||
self._deprecations[new_msg] = 1
|
||||
|
||||
def warning(self, msg):
|
||||
|
|
Loading…
Reference in a new issue