Show More
@@ -505,7 +505,7 b' class ui(object):' | |||
|
505 | 505 | v = os.path.join(base, os.path.expanduser(v)) |
|
506 | 506 | return v |
|
507 | 507 | |
|
508 |
def configbool(self, section, name, default= |
|
|
508 | def configbool(self, section, name, default=_unset, untrusted=False): | |
|
509 | 509 | """parse a configuration element as a boolean |
|
510 | 510 | |
|
511 | 511 | >>> u = ui(); s = 'foo' |
@@ -526,8 +526,10 b' class ui(object):' | |||
|
526 | 526 | ConfigError: foo.invalid is not a boolean ('somevalue') |
|
527 | 527 | """ |
|
528 | 528 | |
|
529 |
v = self.config(section, name, |
|
|
529 | v = self.config(section, name, default, untrusted=untrusted) | |
|
530 | 530 | if v is None: |
|
531 | if default is _unset: | |
|
532 | return False | |
|
531 | 533 | return default |
|
532 | 534 | if isinstance(v, bool): |
|
533 | 535 | return v |
General Comments 0
You need to be logged in to leave comments.
Login now