From 78e1dac6bdddfb2fd040000830d213d5af68c0ef Mon Sep 17 00:00:00 2001 From: corentih Date: Fri, 13 Nov 2015 02:29:13 -0800 Subject: [PATCH] change loglevel to error for internal errors When nose2 encounter an internal error, it swallows the stacktrace if log level is not debug. To make debugging easier, change log level to error. --- nose2/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nose2/main.py b/nose2/main.py index 2b44c6c1..b6e5ecc4 100644 --- a/nose2/main.py +++ b/nose2/main.py @@ -108,7 +108,7 @@ def parseArgs(self, argv): """ self.session = self.sessionClass() self.__class__._currentSession = self.session - + self.argparse = self.session.argparse # for convenience # XXX force these? or can it be avoided? @@ -270,7 +270,7 @@ def runTests(self): try: self.result = runner.run(self.test) except Exception as e: - log.debug('Internal Error', exc_info=True) + log.exception('Internal Error') sys.stderr.write('Internal Error: runTests aborted: %s\n'%(e)) if self.exit: sys.exit(1) @@ -287,7 +287,7 @@ def _makeRunner(self): @classmethod def getCurrentSession(cls): """Returns the current session, or ``None`` if no :class:`nose2.session.Session` is running. - + """ return cls._currentSession