• Brady J. Garvin's avatar
    utils: Support mixed str/bytes control sequences. · d44c33ad
    Brady J. Garvin authored
    It is not safe for `_preformat_levels` to assume that all of the fields in a
    `TerminalController` have the same type; at least in my environment, some of
    these fields are populated with `bytes` while others remain strings.
    This change conditionally applies decoding to each control sequence separately
    using a helper function `_as_string`.  As a side-effect, it also eliminates some
    code repetition in `_preformat_levels`.
    Closes #2407.
loggable.py 28.7 KB