mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-24 18:41:38 +08:00
Merge branch 'master' of /git/ansible
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user