1
0
Fork 0
forked from github/pelican

Merge pull request #2508 from oulenz/feed_importer

Reverts bug involving strftime accidentally introduced in feed importer
This commit is contained in:
Justin Mayer 2019-01-27 10:34:38 +01:00 committed by GitHub
commit 5517e0dece
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ import os
import re
import subprocess
import sys
import time
from codecs import open
from collections import defaultdict
@ -563,7 +564,7 @@ def feed2fields(file):
settings = read_settings()
subs = settings['SLUG_REGEX_SUBSTITUTIONS']
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)
author = entry.author if hasattr(entry, 'author') else None
tags = ([e['term'] for e in entry.tags]