mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixes Exception name related bugs
Fixes two bugs that was introduced by #1743: - First was the unnecessary exception name output when skipping content files if a required metadata wasn't available. It was `ERROR: Skipping ./demo.rst: could not find information about 'NameError: date'` and now should be `ERROR: Skipping ./demo.rst: could not find information about 'date'` - Second was a more serious issue. Improper string formatting in the logger resulted in implicit decoding and would break for non-ascii error messages.
This commit is contained in:
parent
c361246eaa
commit
a8be1b562e
2 changed files with 3 additions and 2 deletions
|
|
@ -473,5 +473,6 @@ def is_valid_content(content, f):
|
|||
return True
|
||||
except NameError as e:
|
||||
logger.error(
|
||||
"Skipping %s: could not find information about '%s'", f, e)
|
||||
"Skipping %s: could not find information about '%s'",
|
||||
f, six.text_type(e))
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue