From cd784cd345c99e237f13a832385e23d9a79d8c5f Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 21 Oct 2016 04:49:49 +0200 Subject: [PATCH] Remove unnecessary warnings (#18121) --- lib/ansible/template/safe_eval.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/ansible/template/safe_eval.py b/lib/ansible/template/safe_eval.py index 19c61c9ea7c..dd41b3a3816 100644 --- a/lib/ansible/template/safe_eval.py +++ b/lib/ansible/template/safe_eval.py @@ -26,12 +26,6 @@ from ansible.compat.six.moves import builtins from ansible import constants as C from ansible.plugins import filter_loader, test_loader -try: - from __main__ import display -except ImportError: - from ansible.utils.display import Display - display = Display() - def safe_eval(expr, locals={}, include_exceptions=False): ''' This is intended for allowing things like: @@ -143,7 +137,6 @@ def safe_eval(expr, locals={}, include_exceptions=False): return (expr, None) return expr except Exception as e: - display.warning('Exception in safe_eval() on expr: %s (%s)' % (expr, e)) if include_exceptions: return (expr, e) return expr