convert_cr_to_oc: Don't bother writing out empty Script.c

directional-lights
Günther Brammer 2016-05-03 02:11:45 +02:00
parent 77e5fb7acf
commit 06b5f0e5ce
1 changed files with 2 additions and 0 deletions

2
tools/convert_cr_to_oc.py 100644 → 100755
View File

@ -99,6 +99,8 @@ for root, dirs, files in os.walk('.'):
lines = f.read().splitlines()
except:
lines = ("")
if lines == ("") and properties == {}:
continue
f = open(os.path.join(root, "Script.c"),"wb")
for i, line in enumerate(lines):
m = localre.match(line)