mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Make DEFAULT_DATE handling compatible with Python 3
s/basestring/six.string_types/
This commit is contained in:
parent
b6285ff792
commit
91736c337e
1 changed files with 1 additions and 1 deletions
|
|
@ -532,7 +532,7 @@ def default_metadata(settings=None, process=None):
|
|||
value = process('category', value)
|
||||
metadata['category'] = value
|
||||
if settings.get('DEFAULT_DATE', None) and settings['DEFAULT_DATE'] != 'fs':
|
||||
if isinstance(settings['DEFAULT_DATE'], basestring):
|
||||
if isinstance(settings['DEFAULT_DATE'], six.string_types):
|
||||
metadata['date'] = get_date(settings['DEFAULT_DATE'])
|
||||
else:
|
||||
metadata['date'] = SafeDatetime(*settings['DEFAULT_DATE'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue