Output the default value into the registry file.

This commit is contained in:
Jeremy Fincher 2004-02-03 23:19:22 +00:00
parent a15b87cd1a
commit b8b014d447

View File

@ -87,6 +87,13 @@ def close(registry, filename, annotated=True):
first = False first = False
else: else:
lines.insert(0, '\n') lines.insert(0, '\n')
lines.append('#\n')
try:
original = value.value
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)
fd.write('%s: %s\n' % (name, value)) fd.write('%s: %s\n' % (name, value))