Skip to content

Commit 8da798f

Browse files
committed
win32 compile.py unlink fix.
1 parent 2b549d5 commit 8da798f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/compile.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,21 @@ def jmerge_files(prefix, suffix, output, files, *args):
2626
merge_files(o, files, *args)
2727

2828
# cough hack
29-
compiled = open(o, "rb").read()
3029
try:
3130
compiled = jarit(o)
3231
except MinifyException, e:
3332
global JAVA_WARNING_SURPRESSED
3433
if not JAVA_WARNING_SURPRESSED:
3534
JAVA_WARNING_SURPRESSED = True
3635
print >>sys.stderr, "warning: minify: %s (not minifying -- javascript will be HUGE)." % e
36+
try:
37+
f = open(o, "rb")
38+
compiled = f.read()
39+
finally:
40+
f.close()
3741

3842
os.unlink(o)
43+
3944
f = open(os.path.join(prefix, "static", suffix, output), "wb")
4045
f.write(COPYRIGHT)
4146
f.write(compiled)

0 commit comments

Comments
 (0)