Skip to content
Snippets Groups Projects
Commit f43988e5 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

ui: optionally ignore sub-options from configitems()

For convenience.
parent dccbebcf
No related branches found
No related tags found
No related merge requests found
......@@ -510,5 +510,5 @@
'''tell whether section exists in config.'''
return section in self._data(untrusted)
def configitems(self, section, untrusted=False):
def configitems(self, section, untrusted=False, ignoresub=False):
items = self._data(untrusted).items(section)
......@@ -514,4 +514,10 @@
items = self._data(untrusted).items(section)
if ignoresub:
newitems = {}
for k, v in items:
if ':' not in k:
newitems[k] = v
items = newitems.items()
if self.debugflag and not untrusted and self._reportuntrusted:
for k, v in self._ucfg.items(section):
if self._tcfg.get(section, k) != v:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment