[PATCH 2 of 3] ui: providing no default value to configpath should not raise an Error
Simon Heimberg
simohe at besonet.ch
Fri Jul 22 23:53:41 CDT 2011
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1311394132 -7200
# Node ID d7473025ba6f336137eeb3dc23447ebe81159012
# Parent 7acbb94c083e2daf98ee2406ccd8f8d087eb85bb
ui: providing no default value to configpath should not raise an Error
diff -r 7acbb94c083e -r d7473025ba6f mercurial/ui.py
--- a/mercurial/ui.py Sam Jul 23 06:08:49 2011 +0200
+++ b/mercurial/ui.py Sam Jul 23 06:08:52 2011 +0200
@@ -166,6 +166,8 @@
def configpath(self, section, name, default=None, untrusted=False):
'get a path config item, expanded relative to config file'
v = self.config(section, name, default, untrusted)
+ if v is None:
+ return None
if not os.path.isabs(v) or "://" not in v:
src = self.configsource(section, name, untrusted)
if ':' in src:
More information about the Mercurial-devel
mailing list