diff options
author | DasIch <dasdasich@gmail.com> | 2010-05-16 19:45:23 +0200 |
---|---|---|
committer | DasIch <dasdasich@gmail.com> | 2010-05-16 19:45:23 +0200 |
commit | fb33cfbee735ecaea18879a8674eb96f19708228 (patch) | |
tree | 9290b0be1c40bda31c7acefd44e681d7d874e63b /utils | |
parent | 048f02e974c8d37bde6cb437b069c645e9b1f9b6 (diff) | |
download | sphinx-fb33cfbee735ecaea18879a8674eb96f19708228.tar.gz |
Fixed file opening
Diffstat (limited to 'utils')
-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 1b30f2dc..8eeadbf4 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 |