def get_latest_changelog():
    'Extract the first section of the changelog.\n    '
    started = False
    lines = []
    with open(CHANGELOG) as f:
        for line in f:
            if re.match('^--+$', line.strip()):
                if started:
                    del lines[(- 1)]
                    break
                else:
                    started = True
            elif started:
                lines.append(line)
    return ''.join(lines).strip()
Extract the first section of the changelog.
def get_latest_changelog():
    '\n    '
    started = False
    lines = []
    with open(CHANGELOG) as f:
        for line in f:
            if re.match('^--+$', line.strip()):
                if started:
                    del lines[(- 1)]
                    break
                else:
                    started = True
            elif started:
                lines.append(line)
    return .join(lines).strip()