From 97bfab73b435930f6f2a8aeb3044b513da516917 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sat, 20 Jun 2020 22:36:54 +0200 Subject: [PATCH] Initialize colorama only once --- python/tidy/servo_tidy/tidy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 9beb0d943cd..aebbefef840 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -1140,13 +1140,12 @@ def scan(only_changed_files=False, progress=True, stylo=False, no_wpt=False): file_errors, dep_license_errors) error = None + colorama.init() for error in errors: - colorama.init() print("\r\033[94m{}\033[0m:\033[93m{}\033[0m: \033[91m{}\033[0m".format(*error)) print() if error is None: - colorama.init() print("\033[92mtidy reported no errors.\033[0m") return int(error is not None)