Fixed file opening

This commit is contained in:
Daniel Neuhäuser
2010-05-16 19:45:23 +02:00
parent d8425102e2
commit ad29ab1b86
+4 -1
View File
@@ -212,7 +212,10 @@ def main(argv):
try:
f = open(fn, 'r')
lines = list(f)
try:
lines = list(f)
finally:
f.close()
except (IOError, OSError), err:
print "%s: cannot open: %s" % (fn, err)
num += 1