mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Better logging.
This commit is contained in:
parent
de367731f1
commit
fd4e62599f
@ -111,11 +111,16 @@ def close(registry, filename, private=True):
|
||||
if hasattr(value, 'value'):
|
||||
if value._showDefault:
|
||||
lines.append('#\n')
|
||||
try:
|
||||
x = value.__class__(value._default, value._help)
|
||||
except Exception, e:
|
||||
exception('Exception instantiating default for %s:',
|
||||
value._name)
|
||||
try:
|
||||
lines.append('# Default value: %s\n' % x)
|
||||
except Exception, e:
|
||||
exception('Exception printing default value:')
|
||||
exception('Exception printing default value of %s:',
|
||||
value._name)
|
||||
lines.append('###\n')
|
||||
fd.writelines(lines)
|
||||
if hasattr(value, 'value'): # This lets us print help for non-valued.
|
||||
|
Loading…
Reference in New Issue
Block a user