
                         J    S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  S r	g)	z Retry logic for HTTP exceptions.    )absolute_import)division)unicode_literals)
exceptions)retryc                    ^  U 4S jnU$ )zDDecorator factory to automatically retry a function for HTTP errors.c                 &   >^ ^ U4S jmU U4S jnU$ )z<Decorator to automatically retry a function for HTTP errors.c                 V   > U [         R                  :H  =(       a    UR                  T:H  $ )N)r   	HttpErrorstatus_code)exc_type	exc_valueunused_tracebackunused_statestatuss       -lib/googlecloudsdk/api_lib/util/http_retry.pyretryIfFRetryOnHttpStatus.<locals>.RetryOnHttpStatusAttribute.<locals>.retryIf!   s)    *... .##v-/    c                  T   > [         R                  " SSSS9nUR                  TXTSS9$ )N      d   )max_retrialsexponential_sleep_multiplier	jitter_msi  )should_retry_ifsleep_ms)r   RetryerRetryOnException)argskwargsretryerfuncr   s      r   wrapperFRetryOnHttpStatus.<locals>.RetryOnHttpStatusAttribute.<locals>.wrapper&   s;    11(+-g%%dD6= & N Nr    )r$   r%   r   r   s   ` @r   RetryOnHttpStatusAttribute5RetryOnHttpStatus.<locals>.RetryOnHttpStatusAttribute   s    /
N
 Nr   r'   )r   r(   s   ` r   RetryOnHttpStatusr*      s     
$#r   N)
__doc__
__future__r   r   r   apitools.base.pyr   googlecloudsdk.core.utilr   r*   r'   r   r   <module>r/      s     ' &  ' ' *$r   