tweak deprecation warnings display
This commit is contained in:
parent
ea5e089056
commit
0031a72e0d
1 changed files with 3 additions and 3 deletions
|
@ -188,12 +188,12 @@ class Display:
|
|||
|
||||
if not removed:
|
||||
if version:
|
||||
new_msg = "[DEPRECATION WARNING]: %s. This feature will be removed in version %s." % (msg, version)
|
||||
new_msg = "[DEPRECATION WARNING]: %s.\nThis feature will be removed in version %s." % (msg, version)
|
||||
else:
|
||||
new_msg = "[DEPRECATION WARNING]: %s. This feature will be removed in a future release." % (msg)
|
||||
new_msg = "[DEPRECATION WARNING]: %s.\nThis feature will be removed in a future release." % (msg)
|
||||
new_msg = new_msg + " Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.\n\n"
|
||||
else:
|
||||
raise AnsibleError("[DEPRECATED]: %s. Please update your playbooks." % msg)
|
||||
raise AnsibleError("[DEPRECATED]: %s.\nPlease update your playbooks." % msg)
|
||||
|
||||
wrapped = textwrap.wrap(new_msg, self.columns, replace_whitespace=False, drop_whitespace=False)
|
||||
new_msg = "\n".join(wrapped) + "\n"
|
||||
|
|
Loading…
Reference in a new issue