From 5b613c49abc421cbbf670f72316cba9a79dfb213 Mon Sep 17 00:00:00 2001 From: DarDar Date: Sun, 21 Jul 2013 21:19:39 +0200 Subject: [PATCH] Use datetime instead of datetime.datetime There is "from datetime import datetime" in beginning of the file. Thus the "datetime.datetime" should be checked as "datetime". --- feedgen/feed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feedgen/feed.py b/feedgen/feed.py index 68cac34..7c7b12f 100644 --- a/feedgen/feed.py +++ b/feedgen/feed.py @@ -419,7 +419,7 @@ class FeedGenerator(object): if not updated is None: if isinstance(updated, basestring): updated = dateutil.parser.parse(updated) - if not isinstance(updated, datetime.datetime): + if not isinstance(updated, datetime): raise ValueError('Invalid datetime format') if updated.tzinfo is None: raise ValueError('Datetime object has no timezone info') @@ -834,7 +834,7 @@ class FeedGenerator(object): if not pubDate is None: if isinstance(pubDate, basestring): pubDate = dateutil.parser.parse(pubDate) - if not isinstance(pubDate, datetime.datetime): + if not isinstance(pubDate, datetime): raise ValueError('Invalid datetime format') if pubDate.tzinfo is None: raise ValueError('Datetime object has no timezone info')