Try utf-16 if utf-8 fails

This commit is contained in:
Dustin Pianalto 2018-05-09 16:26:46 -08:00
parent b49c3cd1bc
commit e2ed331e5b

View File

@ -78,6 +78,7 @@ def process_file(in_file, file_type, encoding) -> ConfigParser:
config = rename_section(config, section, section.title()) config = rename_section(config, section, section.title())
else: else:
config.remove_section(section) config.remove_section(section)
print(config.sections())
return config return config
@ -124,7 +125,6 @@ def process_files(z) -> (ConfigParser, ConfigParser, list):
except UnicodeDecodeError as e: except UnicodeDecodeError as e:
print(e) print(e)
return 0, 0, 0 return 0, 0, 0
print([dino.sections() for key, dino in dino_data.values()])
rmtree('submissions_temp/tmp') rmtree('submissions_temp/tmp')
if not mods: if not mods:
mods = check_for_modded_dinos(dino_data, mods) mods = check_for_modded_dinos(dino_data, mods)