Merge branch 'master' of /git/ansible

This commit is contained in:
Jeremy Cline
2017-08-21 18:27:49 +00:00

View File

@@ -183,7 +183,7 @@ The Fedora admins.
"""
def resilient_partial(fn, *initial):
def resilient_partial(fn, *initial, **kwargs):
""" A decorator that partially applies arguments.
It additionally catches all raised exceptions, prints them, but then returns
@@ -196,7 +196,7 @@ def resilient_partial(fn, *initial):
def wrapper(*additional):
try:
full = initial + additional
return fn(*full)
return fn(*full, **kwargs)
except Exception as e:
traceback.print_exc()
return None