10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-12-30 16:15:41 +01:00

Fixed UnicodeError

This commit is contained in:
Anthony Scemama 2020-03-17 11:32:10 +01:00
parent 199d035364
commit 4cde057ea2

View File

@ -78,12 +78,15 @@ def init():
if command_line.do_warnings:
print("Warning : Unable to read file %s."%(filename))
else:
buffer = file.read()
file.close()
if not util.same_file(irpf90_t.irpdir+filename,buffer):
file = open(irpf90_t.irpdir+filename,"w")
file.write(buffer)
try:
buffer = file.read()
file.close()
if not util.same_file(irpf90_t.irpdir+filename,buffer):
file = open(irpf90_t.irpdir+filename,"w")
file.write(buffer)
file.close()
except UnicodeError:
pass
initialized = True