check.py : Improve import debug output.
This commit is contained in:
parent
24b2da3a2e
commit
a9de0d9d76
1 changed files with 6 additions and 4 deletions
10
check.py
10
check.py
|
@ -237,7 +237,7 @@ class Mapping:
|
||||||
self.guid = guid
|
self.guid = guid
|
||||||
|
|
||||||
|
|
||||||
def import_header(filepath):
|
def import_header(filepath, debug_out = False):
|
||||||
class Platform:
|
class Platform:
|
||||||
XINPUT = 0
|
XINPUT = 0
|
||||||
WINDOWS = 1
|
WINDOWS = 1
|
||||||
|
@ -293,8 +293,6 @@ def import_header(filepath):
|
||||||
if current_platform == Platform.IOS:
|
if current_platform == Platform.IOS:
|
||||||
mapping_string += "platform:iOS,"
|
mapping_string += "platform:iOS,"
|
||||||
|
|
||||||
print(mapping_string)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mapping = Mapping(mapping_string, lineno + 1)
|
mapping = Mapping(mapping_string, lineno + 1)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
@ -303,6 +301,10 @@ def import_header(filepath):
|
||||||
print("Ignoring mapping")
|
print("Ignoring mapping")
|
||||||
print(line)
|
print(line)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if debug_out:
|
||||||
|
print("%s : Importing %s" % (mapping.platform, mapping.name))
|
||||||
|
|
||||||
mappings_dict[mapping.platform][mapping.guid] = mapping
|
mappings_dict[mapping.platform][mapping.guid] = mapping
|
||||||
input_file.close()
|
input_file.close()
|
||||||
|
|
||||||
|
@ -371,7 +373,7 @@ def main():
|
||||||
if not args.format:
|
if not args.format:
|
||||||
print("Use --format option to save database. Running in debug "\
|
print("Use --format option to save database. Running in debug "\
|
||||||
"output mode...")
|
"output mode...")
|
||||||
import_header(args.import_header)
|
import_header(args.import_header, not args.format)
|
||||||
|
|
||||||
if args.format:
|
if args.format:
|
||||||
print("\nFormatting db.")
|
print("\nFormatting db.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue