• L
    utils.process: Ignore decode-errors when logging the output · 4540e937
    Lukáš Doktor 提交于
    It might happen that user runs process with encoding that is ritcher
    than system one. This is fine by the process as internally it stores
    encoded bytes object, but the drainer might fail attempting to log the
    output.
    
    Those failures should not be critical as, under described circumstances,
    the unavailability of the output is expected and should not prevent the
    execution. Let's simply replace those characters using 'replace' (the
    'xmlcharrefreplace' might fail with ASCII coder) and keep processing the
    data.
    
    To simplify error handling new "astring.to_text" argument "errors" is
    added.
    Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
    Signed-off-by: NCleber Rosa <crosa@redhat.com>
    4540e937
test_utils_process.py 16.8 KB