def my_retried_method(count_func): count_func() exception = BotoServerError("400", "error") exception.code = 'ValidationError' raise exception
def my_retried_method(count_func): count_func() exception = BotoServerError("400", "error") exception.code = 'Throttling' raise exception