mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-10-11 14:27:26 +02:00
Handled non-existent helps.
This commit is contained in:
parent
52bdcaf41d
commit
fea97c96b5
@ -70,7 +70,10 @@ def close(registry, filename, annotated=True):
|
|||||||
helpCache = sets.Set()
|
helpCache = sets.Set()
|
||||||
fd = file(filename, 'w')
|
fd = file(filename, 'w')
|
||||||
for (name, value) in registry.getValues(getChildren=True):
|
for (name, value) in registry.getValues(getChildren=True):
|
||||||
if annotated and hasattr(value,'help') and value.help not in helpCache:
|
if annotated and \
|
||||||
|
hasattr(value,'help') and \
|
||||||
|
value.help and \
|
||||||
|
value.help not in helpCache:
|
||||||
helpCache.add(value.help)
|
helpCache.add(value.help)
|
||||||
lines = textwrap.wrap(value.help)
|
lines = textwrap.wrap(value.help)
|
||||||
for (i, line) in enumerate(lines):
|
for (i, line) in enumerate(lines):
|
||||||
@ -220,7 +223,7 @@ class SeparatedListOf(Value):
|
|||||||
class SpaceSeparatedListOfStrings(SeparatedListOf):
|
class SpaceSeparatedListOfStrings(SeparatedListOf):
|
||||||
Value = String
|
Value = String
|
||||||
def splitter(self, s):
|
def splitter(self, s):
|
||||||
return s.split(s)
|
return s.split()
|
||||||
joiner = ' '.join
|
joiner = ' '.join
|
||||||
|
|
||||||
class CommaSeparatedListOfStrings(SeparatedListOf):
|
class CommaSeparatedListOfStrings(SeparatedListOf):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user