def asunicode(s):
    """Turns bytes into unicode, if needed.

    Uses UTF-8.
    """
    if isinstance(s, bytes):
        return s.decode('utf-8', 'replace')
    else:
        return s
Turns bytes into unicode, if needed.

    Uses UTF-8.
    
bin/scp.py