mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
commit
1352d2638a
2 changed files with 1 additions and 2 deletions
|
|
@ -444,7 +444,6 @@ def main():
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if (args.verbosity == logging.DEBUG):
|
if (args.verbosity == logging.DEBUG):
|
||||||
logger.critical('Internal failure: %r', e, exc_info=True)
|
|
||||||
raise
|
raise
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'Caught exception "%s". Reloading.', e)
|
'Caught exception "%s". Reloading.', e)
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ class SafeLogger(logging.Logger):
|
||||||
so convert the message to unicode with the correct encoding
|
so convert the message to unicode with the correct encoding
|
||||||
'''
|
'''
|
||||||
if isinstance(arg, Exception):
|
if isinstance(arg, Exception):
|
||||||
text = str(arg)
|
text = '%s: %s' % (arg.__class__.__name__, arg)
|
||||||
if six.PY2:
|
if six.PY2:
|
||||||
text = text.decode(self._exc_encoding)
|
text = text.decode(self._exc_encoding)
|
||||||
return text
|
return text
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue