mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2508 from oulenz/feed_importer
Reverts bug involving strftime accidentally introduced in feed importer
This commit is contained in:
commit
5517e0dece
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
from codecs import open
|
from codecs import open
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
|
|
@ -563,7 +564,7 @@ def feed2fields(file):
|
||||||
settings = read_settings()
|
settings = read_settings()
|
||||||
subs = settings['SLUG_REGEX_SUBSTITUTIONS']
|
subs = settings['SLUG_REGEX_SUBSTITUTIONS']
|
||||||
for entry in d.entries:
|
for entry in d.entries:
|
||||||
date = (entry.updated_parsed.strftime('%Y-%m-%d %H:%M')
|
date = (time.strftime('%Y-%m-%d %H:%M', entry.updated_parsed)
|
||||||
if hasattr(entry, 'updated_parsed') else None)
|
if hasattr(entry, 'updated_parsed') else None)
|
||||||
author = entry.author if hasattr(entry, 'author') else None
|
author = entry.author if hasattr(entry, 'author') else None
|
||||||
tags = ([e['term'] for e in entry.tags]
|
tags = ([e['term'] for e in entry.tags]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue