mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +01:00
Added support for groups alone having help.
This commit is contained in:
parent
2092fe4134
commit
f2f2680c91
@ -85,6 +85,7 @@ def close(registry, filename, annotated=True, helpOnceOnly=False):
|
||||
first = False
|
||||
else:
|
||||
lines.insert(0, '\n')
|
||||
if hasattr(value, 'value'):
|
||||
lines.append('#\n')
|
||||
try:
|
||||
original = value.value
|
||||
@ -94,6 +95,7 @@ def close(registry, filename, annotated=True, helpOnceOnly=False):
|
||||
value.value = original
|
||||
lines.append('###\n')
|
||||
fd.writelines(lines)
|
||||
if hasattr(value, 'value'): # This lets us print help for non-valued.
|
||||
fd.write('%s: %s\n' % (name, value))
|
||||
fd.close()
|
||||
|
||||
@ -177,7 +179,7 @@ class Group(object):
|
||||
L = []
|
||||
for name in self.added:
|
||||
node = self.children[name]
|
||||
if hasattr(node, 'value'):
|
||||
if hasattr(node, 'value') or hasattr(node, 'help'):
|
||||
if node.__class__ is not self.X:
|
||||
L.append((node.name, node))
|
||||
if getChildren:
|
||||
|
Loading…
Reference in New Issue
Block a user