Feedparser: avoid warning due to their workaround

see Feedparser issues 328 and 310
This commit is contained in:
Matthias Urlichs committed 2019-02-03 17:39:12 +01:00
1 parent 9c5d1dec59
commit 372a8d2ea8
1 file changed
+3 -3
@@ -404,9 +404,9 @@ class AnnouncementPlugin(octoprint.plugin.AssetPlugin,
def _to_internal_entry(self, entry, read_until=None):
"""Convert feed entries to internal data structure."""
timestamp = entry.get("published_parsed",
entry.get("updated_parsed",
None))
timestamp = entry.get("published_parsed", None)
if timestamp is None:
timestamp = entry.get("updated_parsed", None)
if timestamp is None:
return None