Handled non-existent helps.

This commit is contained in:
Jeremy Fincher 2004-01-21 19:12:51 +00:00
parent 52bdcaf41d
commit fea97c96b5
1 changed files with 5 additions and 2 deletions

View File

@ -70,7 +70,10 @@ def close(registry, filename, annotated=True):
helpCache = sets.Set()
fd = file(filename, 'w')
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)
lines = textwrap.wrap(value.help)
for (i, line) in enumerate(lines):
@ -220,7 +223,7 @@ class SeparatedListOf(Value):
class SpaceSeparatedListOfStrings(SeparatedListOf):
Value = String
def splitter(self, s):
return s.split(s)
return s.split()
joiner = ' '.join
class CommaSeparatedListOfStrings(SeparatedListOf):