mirror of
https://github.com/servo/servo.git
synced 2025-07-25 16:20:36 +01:00
Initialize colorama only once
This commit is contained in:
parent
232d9269e7
commit
97bfab73b4
1 changed files with 1 additions and 2 deletions
|
@ -1140,13 +1140,12 @@ def scan(only_changed_files=False, progress=True, stylo=False, no_wpt=False):
|
||||||
file_errors, dep_license_errors)
|
file_errors, dep_license_errors)
|
||||||
|
|
||||||
error = None
|
error = None
|
||||||
for error in errors:
|
|
||||||
colorama.init()
|
colorama.init()
|
||||||
|
for error in errors:
|
||||||
print("\r\033[94m{}\033[0m:\033[93m{}\033[0m: \033[91m{}\033[0m".format(*error))
|
print("\r\033[94m{}\033[0m:\033[93m{}\033[0m: \033[91m{}\033[0m".format(*error))
|
||||||
|
|
||||||
print()
|
print()
|
||||||
if error is None:
|
if error is None:
|
||||||
colorama.init()
|
|
||||||
print("\033[92mtidy reported no errors.\033[0m")
|
print("\033[92mtidy reported no errors.\033[0m")
|
||||||
|
|
||||||
return int(error is not None)
|
return int(error is not None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue