changeset 14923:351624f8f523

ui: providing no default value to configpath should not raise an Error
author Simon Heimberg <simohe@besonet.ch>
date Sat, 23 Jul 2011 06:08:52 +0200
parents 1bc970a77977
children 545e00279670
files mercurial/ui.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Sat Jul 23 06:08:49 2011 +0200
+++ b/mercurial/ui.py	Sat 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: