mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fixed file opening
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user