mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Consider file encoding for modules in reconfigure
If the modules are not in utf8 then we warn and skip that file like it happens for layout files. It would be nice in both cases to have a warn in the gui and not only in the config.log
This commit is contained in:
parent
5a212823d7
commit
a8094051c1
@ -1562,9 +1562,17 @@ def checkModulesConfig():
|
||||
continue
|
||||
|
||||
seen.append(filename)
|
||||
retval = processModuleFile(file, filename)
|
||||
if retval:
|
||||
tx.write(retval)
|
||||
try:
|
||||
retval = processModuleFile(file, filename)
|
||||
if retval:
|
||||
tx.write(retval)
|
||||
except UnicodeDecodeError:
|
||||
logger.warning("**************************************************\n"
|
||||
"Module file '%s'\n"
|
||||
"cannot be decoded in utf-8.\n"
|
||||
"Please check if the file has the correct encoding.\n"
|
||||
"Skipping this file!\n"
|
||||
"**************************************************" % filename)
|
||||
tx.close()
|
||||
logger.info('\tdone')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user