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
1 changed files with 7 additions and 0 deletions

View File

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