Show More
@@ -434,16 +434,16 b' class ui(object):' | |||
|
434 | 434 | return |
|
435 | 435 | raise |
|
436 | 436 | |
|
437 | cfg = config.config() | |
|
438 | trusted = sections or trust or self._trusted(fp, filename) | |
|
437 | with fp: | |
|
438 | cfg = config.config() | |
|
439 | trusted = sections or trust or self._trusted(fp, filename) | |
|
439 | 440 | |
|
440 | try: | |
|
441 | cfg.read(filename, fp, sections=sections, remap=remap) | |
|
442 | fp.close() | |
|
443 | except error.ParseError as inst: | |
|
444 |
|
|
|
445 | raise | |
|
446 | self.warn(_(b"ignored: %s\n") % stringutil.forcebytestr(inst)) | |
|
441 | try: | |
|
442 | cfg.read(filename, fp, sections=sections, remap=remap) | |
|
443 | except error.ParseError as inst: | |
|
444 | if trusted: | |
|
445 | raise | |
|
446 | self.warn(_(b'ignored: %s\n') % stringutil.forcebytestr(inst)) | |
|
447 | 447 | |
|
448 | 448 | if self.plain(): |
|
449 | 449 | for k in ( |
General Comments 0
You need to be logged in to leave comments.
Login now