def dedupe_newlines(s):
    """yaml.safe_dump converts single newlines to double.

    Since we're printing this output and not loading it, we should
    deduplicate them.
    """

    if isinstance(s, six.string_types):
        s = s.replace("\n\n", "\n")

    return s
yaml.safe_dump converts single newlines to double.

    Since we're printing this output and not loading it, we should
    deduplicate them.
    
st2client/st2client/utils/strutil.py