Skip to content

Commit

Permalink
Initialize colorama only once
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Jun 20, 2020
1 parent 232d926 commit 97bfab7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/tidy/servo_tidy/tidy.py
Expand Up @@ -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)

0 comments on commit 97bfab7

Please sign in to comment.