From af3a165a20b27912358394180a7d651d1ff3604d Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 23 Feb 2023 00:28:36 -0800 Subject: [PATCH] fix bug in ColorStream --- lib/spack/llnl/util/tty/color.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/spack/llnl/util/tty/color.py b/lib/spack/llnl/util/tty/color.py index bfb6338798b..f5eeee4c227 100644 --- a/lib/spack/llnl/util/tty/color.py +++ b/lib/spack/llnl/util/tty/color.py @@ -326,8 +326,7 @@ def __init__(self, stream, color=None): self._stream = stream self._color = color - def write(self, string, **kwargs): - raw = kwargs.get("raw", False) + def write(self, string, raw=False): raw_write = getattr(self._stream, "write") color = self._color @@ -338,7 +337,6 @@ def write(self, string, **kwargs): color = get_color_when() raw_write(colorize(string, color=color)) - def writelines(self, sequence, **kwargs): - raw = kwargs.get("raw", False) + def writelines(self, sequence, raw=False): for string in sequence: - self.write(string, self.color, raw=raw) + self.write(string, raw=raw)