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