diff --git a/scripts/check-urls.py b/scripts/check-urls.py index a635f12..a6f161c 100644 --- a/scripts/check-urls.py +++ b/scripts/check-urls.py @@ -217,8 +217,11 @@ def main(files): queue.put_nowait(None) checker.join() + if BROKEN_URLS: + # Flush stdout buffer before print to stderr + print("Errors:", flush=True) for url, files in BROKEN_URLS.items(): - print("BROKEN URL: '%s' in files: %s" % (url, ", ".join(files)), file=sys.stderr) + print("BROKEN URL: '%s' in files: %s" % (url, ", ".join(files)), file=sys.stderr, flush=True) if BROKEN_URLS: exit(1)