mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
do not re-write the class map header if not neccessary
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3a1f7dac3b
commit
441af8a0d9
1 changed files with 7 additions and 6 deletions
|
@ -44,9 +44,10 @@ for component in components:
|
|||
|
||||
mapdata += '\n#endif\n'
|
||||
|
||||
sys.stdout.write('-- Writing: %s\n' % mapoutput)
|
||||
with open(mapoutput, 'wb') as f:
|
||||
if sys.version_info[0] == 3:
|
||||
f.write(bytes(mapdata, 'utf-8'))
|
||||
else:
|
||||
f.write(mapdata)
|
||||
with open(mapoutput, 'r+b') as f:
|
||||
if f.read() != mapdata:
|
||||
sys.stdout.write('-- Writing: %s\n' % mapoutput)
|
||||
if sys.version_info[0] == 3:
|
||||
f.write(bytes(mapdata, 'utf-8'))
|
||||
else:
|
||||
f.write(mapdata)
|
Loading…
Add table
Reference in a new issue