Mercurial > hg
comparison mercurial/ignore.py @ 15407:ee112eb69d2a stable
misc: adding missing file close() calls
Spotted by Victor Stinner <victor.stinner@haypocalc.com>
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 03 Nov 2011 11:24:55 -0500 |
parents | 58c497d0e44d |
children | b35e3364f94a |
comparison
equal
deleted
inserted
replaced
15401:a708b65baeb9 | 15407:ee112eb69d2a |
---|---|
76 for f in files: | 76 for f in files: |
77 try: | 77 try: |
78 pats[f] = [] | 78 pats[f] = [] |
79 fp = open(f) | 79 fp = open(f) |
80 pats[f], warnings = ignorepats(fp) | 80 pats[f], warnings = ignorepats(fp) |
81 fp.close() | |
81 for warning in warnings: | 82 for warning in warnings: |
82 warn("%s: %s\n" % (f, warning)) | 83 warn("%s: %s\n" % (f, warning)) |
83 except IOError, inst: | 84 except IOError, inst: |
84 if f != files[0]: | 85 if f != files[0]: |
85 warn(_("skipping unreadable ignore file '%s': %s\n") % | 86 warn(_("skipping unreadable ignore file '%s': %s\n") % |