diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-06-30 18:19:34 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-06-30 18:19:34 +0200 |
commit | ac47c4846c01e31369d9f9472985786280227d9a (patch) | |
tree | 4c2c760703d5e1d495d306c6c2b20b040241a8ae /scripts/utils.py | |
parent | c806a50f0e1ec8b683e583d2a02f1b1762c099fe (diff) | |
download | qutebrowser-ac47c4846c01e31369d9f9472985786280227d9a.tar.gz qutebrowser-ac47c4846c01e31369d9f9472985786280227d9a.zip |
scripts: Always flush output with utils.print_col
Hopefully helps with GitHub Actions
Diffstat (limited to 'scripts/utils.py')
-rw-r--r-- | scripts/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/utils.py b/scripts/utils.py index ce7d8eb75..7a9bc3a43 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -59,14 +59,14 @@ def _esc(code): return '\033[{}m'.format(code) -def print_col(text, color, file=sys.stdout, flush=False): +def print_col(text, color, file=sys.stdout): """Print a colorized text.""" if use_color: fg = _esc(fg_colors[color.lower()]) reset = _esc(fg_colors['reset']) - print(''.join([fg, text, reset]), file=file, flush=flush) + print(''.join([fg, text, reset]), file=file, flush=True) else: - print(text, file=file, flush=flush) + print(text, file=file, flush=True) def print_error(text): @@ -77,12 +77,12 @@ def print_title(text): """Print a title.""" print() print_col("==================== {} ====================".format(text), - 'yellow', flush=True) + 'yellow') def print_subtitle(text): """Print a subtitle.""" - print_col("------ {} ------".format(text), 'cyan', flush=True) + print_col("------ {} ------".format(text), 'cyan') def change_cwd(): |