def warn_exception(func, *args, **kwargs):
 try:
  return func(*args, **kwargs)
 except:
  warn(("%s('%s') ignored" % sys.exc_info()[0:2]))

def warn_exception ( func , * args , ** kwargs ) : try : return func ( * args , ** kwargs ) except : warn ( ( "%s('%s') ignored" % sys . exc_info ( ) [ 0 : 2 ] ) )
executes the given function .