1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove unnecessary warnings (#18121)

This commit is contained in:
Dag Wieers 2016-10-21 04:49:49 +02:00 committed by jctanner
parent 492da6ce71
commit cd784cd345

View file

@ -26,12 +26,6 @@ from ansible.compat.six.moves import builtins
from ansible import constants as C from ansible import constants as C
from ansible.plugins import filter_loader, test_loader 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): def safe_eval(expr, locals={}, include_exceptions=False):
''' '''
This is intended for allowing things like: This is intended for allowing things like:
@ -143,7 +137,6 @@ def safe_eval(expr, locals={}, include_exceptions=False):
return (expr, None) return (expr, None)
return expr return expr
except Exception as e: except Exception as e:
display.warning('Exception in safe_eval() on expr: %s (%s)' % (expr, e))
if include_exceptions: if include_exceptions:
return (expr, e) return (expr, e)
return expr return expr