def _tag_retriables_as_unretriable(f):
 @six.wraps(f)
 def wrapped(*args, **kwargs):
  try:
   return f(*args, **kwargs)
  except Exception as e:
   with excutils.save_and_reraise_exception():
    if is_retriable(e):
     setattr(e, '_RETRY_EXCEEDED', True)
 return wrapped

def _tag_retriables_as_unretriable ( f ) : @ six . wraps ( f ) def wrapped ( * args , ** kwargs ) : try : return f ( * args , ** kwargs ) except Exception as e : with excutils . save_and_reraise_exception ( ) : if is_retriable ( e ) : setattr ( e , '_RETRY_EXCEEDED' , True ) return wrapped
puts a flag on retriable exceptions so is_retriable returns false .