Skip to content

Commit

Permalink
change loglevel to error for internal errors
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
corentih committed Nov 13, 2015
1 parent 88ea394 commit 78e1dac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nose2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 78e1dac

Please sign in to comment.