##// END OF EJS Templates
config: catch intended exception when failing to parse config...
Martin von Zweigbergk -
r44361:dbaf9aab default
parent child Browse files
Show More
@@ -440,7 +440,7 b' class ui(object):'
440 try:
440 try:
441 cfg.read(filename, fp, sections=sections, remap=remap)
441 cfg.read(filename, fp, sections=sections, remap=remap)
442 fp.close()
442 fp.close()
443 except error.ConfigError as inst:
443 except error.ParseError as inst:
444 if trusted:
444 if trusted:
445 raise
445 raise
446 self.warn(_(b"ignored: %s\n") % stringutil.forcebytestr(inst))
446 self.warn(_(b"ignored: %s\n") % stringutil.forcebytestr(inst))
@@ -174,7 +174,7 b' quux'
174 # parse error
174 # parse error
175 # different user, different group
175 # different user, different group
176 not trusting file .hg/hgrc from untrusted user abc, group def
176 not trusting file .hg/hgrc from untrusted user abc, group def
177 ParseError('foo', '.hg/hgrc:1')
177 ignored: ('foo', '.hg/hgrc:1')
178 # same user, same group
178 # same user, same group
179 ParseError('foo', '.hg/hgrc:1')
179 ParseError('foo', '.hg/hgrc:1')
180
180
General Comments 0
You need to be logged in to leave comments. Login now