From 1ea5e55a8eeaf1e7a8dd3c5001a6c4e1d1d76962 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 30 Sep 2004 22:13:47 +0000 Subject: [PATCH] Changed to be better, hopefully. We really need to find out where this losing of channel values is happening. --- src/registry.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/registry.py b/src/registry.py index 1fdeb5506..391c0e09d 100644 --- a/src/registry.py +++ b/src/registry.py @@ -100,12 +100,8 @@ def close(registry, filename, annotated=True, helpOnceOnly=False): if hasattr(value, 'value'): if value._showDefault: lines.append('#\n') - try: - original = value.value - value.value = value._default - lines.append('# Default value: %s\n' % value) - finally: - value.value = original + x = value.__class__(value._default, value._help) + lines.append('# Default value: %s\n' % x) lines.append('###\n') fd.writelines(lines) if hasattr(value, 'value'): # This lets us print help for non-valued.