Show More
@@ -30,6 +30,8 b' class config(object):' | |||
|
30 | 30 | return config(self) |
|
31 | 31 | def __contains__(self, section): |
|
32 | 32 | return section in self._data |
|
33 | def hasitem(self, section, item): | |
|
34 | return item in self._data.get(section, {}) | |
|
33 | 35 | def __getitem__(self, section): |
|
34 | 36 | return self._data.get(section, {}) |
|
35 | 37 | def __iter__(self): |
@@ -507,6 +507,9 b' class ui(object):' | |||
|
507 | 507 | result = default or [] |
|
508 | 508 | return result |
|
509 | 509 | |
|
510 | def hasconfig(self, section, name, untrusted=False): | |
|
511 | return self._data(untrusted).hasitem(section, name) | |
|
512 | ||
|
510 | 513 | def has_section(self, section, untrusted=False): |
|
511 | 514 | '''tell whether section exists in config.''' |
|
512 | 515 | return section in self._data(untrusted) |
General Comments 0
You need to be logged in to leave comments.
Login now