Show More
@@ -50,7 +50,7 b' class config(object):' | |||||
50 | self._source.update(src._source) |
|
50 | self._source.update(src._source) | |
51 | def get(self, section, item, default=None): |
|
51 | def get(self, section, item, default=None): | |
52 | return self._data.get(section, {}).get(item, default) |
|
52 | return self._data.get(section, {}).get(item, default) | |
53 |
def |
|
53 | def source(self, section, item): | |
54 | return self._source.get((section, item), "") |
|
54 | return self._source.get((section, item), "") | |
55 | def sections(self): |
|
55 | def sections(self): | |
56 | return sorted(self._data.keys()) |
|
56 | return sorted(self._data.keys()) |
@@ -72,7 +72,7 b' class templater(object):' | |||||
72 | self.cache[key] = parsestring(val) |
|
72 | self.cache[key] = parsestring(val) | |
73 | except SyntaxError, inst: |
|
73 | except SyntaxError, inst: | |
74 | raise SyntaxError('%s: %s' % |
|
74 | raise SyntaxError('%s: %s' % | |
75 |
(conf. |
|
75 | (conf.source('', key), inst.args[0])) | |
76 | else: |
|
76 | else: | |
77 | self.map[key] = os.path.join(self.base, val) |
|
77 | self.map[key] = os.path.join(self.base, val) | |
78 |
|
78 |
@@ -133,7 +133,7 b' class ui(object):' | |||||
133 | return self.cdata |
|
133 | return self.cdata | |
134 |
|
134 | |||
135 | def configsource(self, section, name, untrusted=False): |
|
135 | def configsource(self, section, name, untrusted=False): | |
136 |
return self._get_cdata(untrusted). |
|
136 | return self._get_cdata(untrusted).source(section, name) or 'none' | |
137 |
|
137 | |||
138 | def config(self, section, name, default=None, untrusted=False): |
|
138 | def config(self, section, name, default=None, untrusted=False): | |
139 | value = self._get_cdata(untrusted).get(section, name, default) |
|
139 | value = self._get_cdata(untrusted).get(section, name, default) |
General Comments 0
You need to be logged in to leave comments.
Login now