947ac4b py3: handle bytes in schema response

1 file Authored by ftweedal 6 years ago, Committed by pvomacka 6 years ago,
    py3: handle bytes in schema response
    
    If a server is running under py2 it could return a bytes value for
    the 'topic_topic' field in the schema response.  A py3 client fails
    to handle this (in one place it applies 'str' to it, which raises
    BytesWarning; in other places it tries to serialise the schema to
    JSON which fails because of the bytes value).
    
    Handle the case where 'topic_topic' is not unicode, and handle bytes
    values when serialising the schema to JSON.
    
    Fixes: https://pagure.io/freeipa/issue/6809
    Reviewed-By: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>