def mustbe_deferred(f, *args, **kw):
 try:
  result = f(*args, **kw)
 except IgnoreRequest as e:
  return defer_fail(failure.Failure(e))
 except:
  return defer_fail(failure.Failure())
 else:
  return defer_result(result)

def mustbe_deferred ( f , * args , ** kw ) : try : result = f ( * args , ** kw ) except IgnoreRequest as e : return defer_fail ( failure . Failure ( e ) ) except : return defer_fail ( failure . Failure ( ) ) else : return defer_result ( result )
same as twisted .