From a9de0d9d76006b32901788764c3534f70c9665b8 Mon Sep 17 00:00:00 2001 From: Philippe Groarke Date: Wed, 10 Jan 2018 13:55:33 -0500 Subject: [PATCH] check.py : Improve import debug output. --- check.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/check.py b/check.py index cba33d4..65d3713 100755 --- a/check.py +++ b/check.py @@ -237,7 +237,7 @@ class Mapping: self.guid = guid -def import_header(filepath): +def import_header(filepath, debug_out = False): class Platform: XINPUT = 0 WINDOWS = 1 @@ -293,8 +293,6 @@ def import_header(filepath): if current_platform == Platform.IOS: mapping_string += "platform:iOS," - print(mapping_string) - try: mapping = Mapping(mapping_string, lineno + 1) except ValueError as e: @@ -303,6 +301,10 @@ def import_header(filepath): print("Ignoring mapping") print(line) continue + + if debug_out: + print("%s : Importing %s" % (mapping.platform, mapping.name)) + mappings_dict[mapping.platform][mapping.guid] = mapping input_file.close() @@ -371,7 +373,7 @@ def main(): if not args.format: print("Use --format option to save database. Running in debug "\ "output mode...") - import_header(args.import_header) + import_header(args.import_header, not args.format) if args.format: print("\nFormatting db.")