From 0031a72e0d7926bc87406e8d514d5ec9ec7dbbbf Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 3 Mar 2016 13:51:44 -0500 Subject: [PATCH] tweak deprecation warnings display --- lib/ansible/utils/display.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/utils/display.py b/lib/ansible/utils/display.py index 296a7b8180..3c0d3f7b5f 100644 --- a/lib/ansible/utils/display.py +++ b/lib/ansible/utils/display.py @@ -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"