mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +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)
|
||||
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