Mercurial > hg-stable
changeset 31721:439a387ca6f1
color: replace str() with pycompat.bytestr()
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 29 Mar 2017 14:47:52 +0530 |
parents | 6c80f985a13c |
children | 62676bb8d534 |
files | mercurial/color.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/color.py Sun Mar 26 20:52:51 2017 +0530 +++ b/mercurial/color.py Wed Mar 29 14:47:52 2017 +0530 @@ -332,9 +332,10 @@ stop = _effect_str(ui, 'none') else: activeeffects = _activeeffects(ui) - start = [str(activeeffects[e]) for e in ['none'] + effects.split()] + start = [pycompat.bytestr(activeeffects[e]) + for e in ['none'] + effects.split()] start = '\033[' + ';'.join(start) + 'm' - stop = '\033[' + str(activeeffects['none']) + 'm' + stop = '\033[' + pycompat.bytestr(activeeffects['none']) + 'm' return _mergeeffects(text, start, stop) _ansieffectre = re.compile(br'\x1b\[[0-9;]*m')