28b0bfa dns plugin: Fix zone normalization under Python 3

1 file Authored by pviktori 3 years ago , Committed by mbasti 3 years ago ,
    dns plugin: Fix zone normalization under Python 3
    
    In Python 3, str.encode('ascii') converts to bytes, and str()
    (nicknamed unicode() in IPA) returns the string representation
    of an object, which is b'...' for bytes.
    
    So, unicode('...'.encode('ascii')) results in "b'...'".
    
    Change the code to only call encode() for the error.
    
    Part of the work for https://fedorahosted.org/freeipa/ticket/4985
    
    Reviewed-By: Martin Basti <mbasti@redhat.com>
    
        
file modified
+3 -1