mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 18:12:40 +00:00
Adding error output for Tag Matcher on Travis (#5780)
I was unable to reproduce issue of decoding non UTF-8 characters. But these lines of code should provide output on which file has the bad character.
This commit is contained in:
committed by
Erki
parent
83963cdca3
commit
97fd11ad54
@@ -75,8 +75,13 @@ for root, subdirs, files in walk(args.dir):
|
||||
# For each file, generate the match dictionary.
|
||||
matches[file_path] = populate_match_list()
|
||||
for x in f:
|
||||
# Then for each line in the file, conduct the tuple open/close matching.
|
||||
get_tag_matches(matches[file_path], x)
|
||||
try:
|
||||
# Then for each line in the file, conduct the tuple open/close matching.
|
||||
get_tag_matches(matches[file_path], x)
|
||||
except UnicodeDecodeError:
|
||||
print("There is a non UTF-8 format character in file {}. Line:\n\r{}".format(f, x))
|
||||
exit(0)
|
||||
|
||||
|
||||
# Pretty printing section.
|
||||
# Loops over all matches and checks if there is a mismatch of tags.
|
||||
|
||||
Reference in New Issue
Block a user