chrome/installer/mac/signing/notarize.py
def _notary_service_retry(func, known_bad_returncodes, short_command_name):
    """Calls the function |func| that runs a subprocess command, retrying it if
    the command exits uncleanly and the returncode is known to be bad (e.g.
    flaky).

    Args:
        func: The function to call within try block that wil catch
            CalledProcessError.
        known_bad_returncodes: An iterable of the returncodes that should be
            ignored and |func| retried.
        short_command_name: A short descriptive string of |func| that will be
            logged when |func| is retried.

    Returns:
        The result of |func|.
    """
    attempt = 0
    while True:
        try:
            return func()
        except subprocess.CalledProcessError as e:
            attempt += 1
            if (attempt < _NOTARY_SERVICE_MAX_RETRIES and
                    e.returncode in known_bad_returncodes):
                logger.warning('Retrying %s, exited %d, output: %s',
                               short_command_name, e.returncode, e.output)
            else:
                raise e
Calls the function |func| that runs a subprocess command, retrying it if
    the command exits uncleanly and the returncode is known to be bad (e.g.
    flaky).

    Args:
        func: The function to call within try block that wil catch
            CalledProcessError.
        known_bad_returncodes: An iterable of the returncodes that should be
            ignored and |func| retried.
        short_command_name: A short descriptive string of |func| that will be
            logged when |func| is retried.

    Returns:
        The result of |func|.
    
Calls the function |func| that runs a subprocess command, retrying it if
the command exits uncleanly and the returncode is known to be bad .
Calls the function |func| that runs a subprocess command retrying it if the command exits uncleanly and the returncode is known to be bad .
def _notary_service_retry(func, known_bad_returncodes, short_command_name):
    attempt = 0
    while True:
        try:
            return func()
        except subprocess.CalledProcessError as e:
            attempt += 1
            if (attempt < _NOTARY_SERVICE_MAX_RETRIES and
                    e.returncode in known_bad_returncodes):
                logger.warning('Retrying %s, exited %d, output: %s',
                               short_command_name, e.returncode, e.output)
            else:
                raise e
def _notary_service_retry ( func , known_bad_returncodes , short_command_name ) : attempt = 0 while True : try : return func ( ) except subprocess . CalledProcessError as e : attempt += 1 if ( attempt < _NOTARY_SERVICE_MAX_RETRIES and e . returncode in known_bad_returncodes ) : logger . warning ( 'Retrying %s, exited %d, output: %s' , short_command_name , e . returncode , e . output ) else : raise e
Calls the function |func| that runs a subprocess command, retrying it if
the command exits uncleanly and the returncode is known to be bad (e.g.
Calls the function |func| that runs a subprocess command retrying it if the command exits uncleanly and the returncode is known to be bad ( e . g .
"""Calls the function |func| that runs a subprocess command, retrying it if
    the command exits uncleanly and the returncode is known to be bad (e.g.
    flaky).

    Args:
        func: The function to call within try block that wil catch
            CalledProcessError.
        known_bad_returncodes: An iterable of the returncodes that should be
            ignored and |func| retried.
        short_command_name: A short descriptive string of |func| that will be
            logged when |func| is retried.

    Returns:
        The result of |func|.
    """
The result of |func|.
The result of |func| .
func
The function to call within try block that wil catch
CalledProcessError.
The function to call within try block that wil catch CalledProcessError .
known_bad_returncodes
An iterable of the returncodes that should be
ignored and |func| retried.
An iterable of the returncodes that should be ignored and |func| retried .
short_command_name
A short descriptive string of |func| that will be
logged when |func| is retried.
A short descriptive string of |func| that will be logged when |func| is retried .