mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +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 hasattr(value, 'value'):
|
||||||
if value._showDefault:
|
if value._showDefault:
|
||||||
lines.append('#\n')
|
lines.append('#\n')
|
||||||
|
try:
|
||||||
x = value.__class__(value._default, value._help)
|
x = value.__class__(value._default, value._help)
|
||||||
|
except Exception, e:
|
||||||
|
exception('Exception instantiating default for %s:',
|
||||||
|
value._name)
|
||||||
try:
|
try:
|
||||||
lines.append('# Default value: %s\n' % x)
|
lines.append('# Default value: %s\n' % x)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
exception('Exception printing default value:')
|
exception('Exception printing default value of %s:',
|
||||||
|
value._name)
|
||||||
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.
|
||||||
|
Loading…
Reference in New Issue
Block a user