mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fixed file opening
This commit is contained in:
parent
d8425102e2
commit
ad29ab1b86
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user