mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2758 from MinchinWeb/settings-pathlib-2
This commit is contained in:
commit
e14f20bb99
6 changed files with 75 additions and 44 deletions
|
|
@ -7,6 +7,7 @@ import os
|
|||
import re
|
||||
import sys
|
||||
from os.path import isabs
|
||||
from pathlib import Path
|
||||
|
||||
from pelican.log import LimitFilter
|
||||
|
||||
|
|
@ -408,7 +409,10 @@ def handle_deprecated_settings(settings):
|
|||
for key in ['TRANSLATION_FEED_ATOM',
|
||||
'TRANSLATION_FEED_RSS'
|
||||
]:
|
||||
if settings.get(key) and '%s' in settings[key]:
|
||||
if (
|
||||
settings.get(key) and not isinstance(settings[key], Path)
|
||||
and '%s' in settings[key]
|
||||
):
|
||||
logger.warning('%%s usage in %s is deprecated, use {lang} '
|
||||
'instead.', key)
|
||||
try:
|
||||
|
|
@ -425,7 +429,10 @@ def handle_deprecated_settings(settings):
|
|||
'TAG_FEED_ATOM',
|
||||
'TAG_FEED_RSS',
|
||||
]:
|
||||
if settings.get(key) and '%s' in settings[key]:
|
||||
if (
|
||||
settings.get(key) and not isinstance(settings[key], Path)
|
||||
and '%s' in settings[key]
|
||||
):
|
||||
logger.warning('%%s usage in %s is deprecated, use {slug} '
|
||||
'instead.', key)
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue