def _parse_author(commit_name, value, type):
    try:
        (real_name, rest) = value.split(' <', 1)
    except ValueError:
        msg = 'error parsing %s: no email address found' % (type,)
        raise BadCommitError(commit_name, msg)

    try:
        (email, rest) = rest.split('> ', 1)
    except ValueError:
        msg = 'error parsing %s: unterminated email address' % (type,)
        raise BadCommitError(commit_name, msg)

    try:
        timestamp = _parse_timestamp(rest)
    except __HOLE__:
        msg = 'error parsing %s: malformatted timestamp' % (type,)
        raise BadCommitError(commit_name, msg)

    return AuthorInfo(real_name, email, timestamp)
dataset/ETHPy150Open facebookarchive/git-review/src/gitreview/git/commit.py/_parse_author