Merge branch 'master' of /git/ansible
This commit is contained in:
commit
0e9fc2e6ed
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue