Changed to be better, hopefully. We really need to find out where this losing of channel values is happening.

This commit is contained in:
Jeremy Fincher 2004-09-30 22:13:47 +00:00
parent d4a36dcb2f
commit 1ea5e55a8e

View File

@ -100,12 +100,8 @@ def close(registry, filename, annotated=True, helpOnceOnly=False):
if hasattr(value, 'value'): if hasattr(value, 'value'):
if value._showDefault: if value._showDefault:
lines.append('#\n') lines.append('#\n')
try: x = value.__class__(value._default, value._help)
original = value.value lines.append('# Default value: %s\n' % x)
value.value = value._default
lines.append('# Default value: %s\n' % value)
finally:
value.value = original
lines.append('###\n') lines.append('###\n')
fd.writelines(lines) fd.writelines(lines)
if hasattr(value, 'value'): # This lets us print help for non-valued. if hasattr(value, 'value'): # This lets us print help for non-valued.