equal
deleted
inserted
replaced
164 return value |
164 return value |
165 |
165 |
166 def configpath(self, section, name, default=None, untrusted=False): |
166 def configpath(self, section, name, default=None, untrusted=False): |
167 'get a path config item, expanded relative to config file' |
167 'get a path config item, expanded relative to config file' |
168 v = self.config(section, name, default, untrusted) |
168 v = self.config(section, name, default, untrusted) |
|
169 if v is None: |
|
170 return None |
169 if not os.path.isabs(v) or "://" not in v: |
171 if not os.path.isabs(v) or "://" not in v: |
170 src = self.configsource(section, name, untrusted) |
172 src = self.configsource(section, name, untrusted) |
171 if ':' in src: |
173 if ':' in src: |
172 base = os.path.dirname(src.rsplit(':')[0]) |
174 base = os.path.dirname(src.rsplit(':')[0]) |
173 v = os.path.join(base, os.path.expanduser(v)) |
175 v = os.path.join(base, os.path.expanduser(v)) |