Browse Source

scripts: fpdiff: Initialise Colorama during start-up

This commit adds a call to the Colorama initialisation function during
the module execution so that ANSI color sequences are properly
converted to the relevant Win32 API calls on the Windows.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
pull/46143/head
Stephanos Ioannidis 3 years ago committed by Marti Bolivar
parent
commit
2ee02f9dfa
  1. 3
      scripts/footprint/fpdiff.py

3
scripts/footprint/fpdiff.py

@ -18,6 +18,7 @@ from anytree.importer import DictImporter @@ -18,6 +18,7 @@ from anytree.importer import DictImporter
from anytree import PreOrderIter
from anytree.search import find
import colorama
from colorama import Fore
import json
import argparse
@ -33,6 +34,8 @@ def parse_args(): @@ -33,6 +34,8 @@ def parse_args():
return parser.parse_args()
def main():
colorama.init()
args = parse_args()
with open(args.file1, "r") as f:

Loading…
Cancel
Save