From 3ecf107c3992157c676d00c833a596228824fb54 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 21 Oct 2019 18:57:31 -0700 Subject: [PATCH] Adjusted print_colored() kwargs --- scripts/wk/std.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/wk/std.py b/scripts/wk/std.py index d7706eab..eeede87e 100644 --- a/scripts/wk/std.py +++ b/scripts/wk/std.py @@ -824,10 +824,13 @@ def pause(prompt='Press Enter to continue... '): input_text(prompt) -def print_colored(strings, colors, **kwargs): +def print_colored(strings, colors, log=False, sep=' ', **kwargs): """Prints strings in the colors specified.""" - LOG.debug('strings: %s, colors: %s, kwargs: %s', strings, colors, kwargs) - msg = color_string(strings, colors, sep=kwargs.get('sep', ' ')) + LOG.debug( + 'strings: %s, colors: %s, sep: %s, kwargs: %s', + strings, colors, sep, kwargs, + ) + msg = color_string(strings, colors, sep=sep) print_options = { 'end': kwargs.get('end', '\n'), 'file': kwargs.get('file', sys.stdout), @@ -835,7 +838,7 @@ def print_colored(strings, colors, **kwargs): } print(msg, **print_options) - if kwargs.get('log', False): + if log: LOG.info(strip_colors(msg))