# HG changeset patch # User Dirkjan Ochtman # Date 2010-01-13 10:53:55 # Node ID cd3e5c47d6631dc5eccaa5ee043ef1905ded8c8b # Parent ecd0a5c8bbe58d72c387607686c75542b3dd9da8 ui: just return it if it's already a bool diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -131,6 +131,8 @@ class ui(object): v = self.config(section, name, None, untrusted) if v is None: return default + if isinstance(v, bool): + return v if v.lower() not in _booleans: raise error.ConfigError(_("%s.%s not a boolean ('%s')") % (section, name, v))