core: Log full backtrace on module build error
This commit is contained in:
parent
faa3891f86
commit
de22d60f72
1 changed files with 3 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ from io import BytesIO
|
||||||
from weboob.exceptions import BrowserHTTPError, BrowserHTTPNotFound
|
from weboob.exceptions import BrowserHTTPError, BrowserHTTPNotFound
|
||||||
from .modules import LoadedModule
|
from .modules import LoadedModule
|
||||||
from weboob.tools.log import getLogger
|
from weboob.tools.log import getLogger
|
||||||
from weboob.tools.misc import to_unicode
|
from weboob.tools.misc import get_backtrace, to_unicode
|
||||||
try:
|
try:
|
||||||
from ConfigParser import RawConfigParser, DEFAULTSECT
|
from ConfigParser import RawConfigParser, DEFAULTSECT
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
@ -120,6 +120,7 @@ class Repository(object):
|
||||||
self.local = None
|
self.local = None
|
||||||
self.signed = False
|
self.signed = False
|
||||||
self.key_update = 0
|
self.key_update = 0
|
||||||
|
self.logger = getLogger('repository')
|
||||||
|
|
||||||
self.modules = {}
|
self.modules = {}
|
||||||
|
|
||||||
|
|
@ -284,6 +285,7 @@ class Repository(object):
|
||||||
fp.close()
|
fp.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('Unable to build module %s: [%s] %s' % (name, type(e).__name__, e), file=sys.stderr)
|
print('Unable to build module %s: [%s] %s' % (name, type(e).__name__, e), file=sys.stderr)
|
||||||
|
self.logger.debug(get_backtrace(e))
|
||||||
else:
|
else:
|
||||||
m = ModuleInfo(module.name)
|
m = ModuleInfo(module.name)
|
||||||
m.version = self.get_tree_mtime(module_path)
|
m.version = self.get_tree_mtime(module_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue