diff options
author | Daniel Neuhäuser <ich@danielneuhaeuser.de> | 2010-05-16 19:45:23 +0200 |
---|---|---|
committer | Daniel Neuhäuser <ich@danielneuhaeuser.de> | 2010-05-16 19:45:23 +0200 |
commit | ad29ab1b860d13fcd0dacd2395f8f3dea5c2370a (patch) | |
tree | 9290b0be1c40bda31c7acefd44e681d7d874e63b /utils/check_sources.py | |
parent | d8425102e27723839fc2c5078ab96c7752de1207 (diff) | |
download | sphinx-git-ad29ab1b860d13fcd0dacd2395f8f3dea5c2370a.tar.gz |
Fixed file opening
Diffstat (limited to 'utils/check_sources.py')
-rwxr-xr-x | utils/check_sources.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/check_sources.py b/utils/check_sources.py index 1b30f2dc5..8eeadbf4b 100755 --- a/utils/check_sources.py +++ b/utils/check_sources.py @@ -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 |