def force_decode(bstring):
    """Tries to decode a bytestring to text.  If that fails, just repr it."""
    try:
        return bstring.decode()
    except UnicodeDecodeError:
        return repr(bstring)[2:-1]