equal
deleted
inserted
replaced
168 if not sections: |
168 if not sections: |
169 return |
169 return |
170 |
170 |
171 cdata = util.configparser() |
171 cdata = util.configparser() |
172 try: |
172 try: |
173 cdata.read(filename) |
173 try: |
|
174 fp = open(filename) |
|
175 except IOError, inst: |
|
176 raise util.Abort(_("unable to open %s: %s") % (filename, |
|
177 getattr(inst, "strerror", inst))) |
|
178 try: |
|
179 cdata.readfp(fp, filename) |
|
180 finally: |
|
181 fp.close() |
174 except ConfigParser.ParsingError, inst: |
182 except ConfigParser.ParsingError, inst: |
175 raise util.Abort(_("failed to parse %s\n%s") % (filename, |
183 raise util.Abort(_("failed to parse %s\n%s") % (filename, |
176 inst)) |
184 inst)) |
177 |
185 |
178 for section in sections: |
186 for section in sections: |