app: add more debug information. refs #714

This commit is contained in:
Mathieu Virbel 2012-10-29 02:01:10 +01:00
parent fb12e1579c
commit fb3ce12c90
1 changed files with 4 additions and 0 deletions

View File

@ -381,6 +381,7 @@ class App(EventDispatcher):
if clsname.endswith('App'):
clsname = clsname[:-3]
filename = join(kv_directory, '%s.kv' % clsname.lower())
Logger.debug('App: Loading kv <{0}>'.format(filename))
if not exists(filename):
Logger.debug('App: kv <%s> not found' % filename)
return False
@ -472,6 +473,7 @@ class App(EventDispatcher):
filename = self.get_application_config()
if filename is None:
return config
Logger.debug('App: Loading configuration <{0}>'.format(filename))
if exists(filename):
try:
config.read(filename)
@ -481,6 +483,8 @@ class App(EventDispatcher):
self.build_config(config)
pass
else:
Logger.debug('App: First configuration, create <{0}>'.format(
filename))
config.filename = filename
config.write()
return config