mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 11:53:32 +01:00
Fixed UnicodeError
This commit is contained in:
parent
199d035364
commit
4cde057ea2
@ -78,12 +78,15 @@ def init():
|
|||||||
if command_line.do_warnings:
|
if command_line.do_warnings:
|
||||||
print("Warning : Unable to read file %s."%(filename))
|
print("Warning : Unable to read file %s."%(filename))
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
buffer = file.read()
|
buffer = file.read()
|
||||||
file.close()
|
file.close()
|
||||||
if not util.same_file(irpf90_t.irpdir+filename,buffer):
|
if not util.same_file(irpf90_t.irpdir+filename,buffer):
|
||||||
file = open(irpf90_t.irpdir+filename,"w")
|
file = open(irpf90_t.irpdir+filename,"w")
|
||||||
file.write(buffer)
|
file.write(buffer)
|
||||||
file.close()
|
file.close()
|
||||||
|
except UnicodeError:
|
||||||
|
pass
|
||||||
|
|
||||||
initialized = True
|
initialized = True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user