3d9523b srpm_import: be compatible with rhbz#1693751

Authored and Committed by praiskup 2 years ago
    srpm_import: be compatible with rhbz#1693751
    
    Older RPMs returned 'bytes' objects, newer return 'str'.
    
    If 'str' object is returned on Python 3 - it doesn't need to be
    decoded, and it actually raises error [1]:
    
        >>> str('', encoding='utf-8')
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        TypeError: decoding str is not supported
    
    This change also OK for Python 2 where str() has decode method
    (str is alternative for bytes).
    
    [1] https://pagure.io/copr/copr/issue/677
    
    Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
    
        
file modified
+6 -5