From 0907e993e4dc38f0f5e08c6b3555fd68e18caf4a Mon Sep 17 00:00:00 2001 From: snipem Date: Mon, 2 Jun 2014 23:08:50 +0200 Subject: [PATCH] Fix skipHours for Python 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The xrange function isn’t available in Python 3. The range function however is doing the same job and is working for both Python 2 and Python 3. --- feedgen/feed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feedgen/feed.py b/feedgen/feed.py index e78e502..194ec5c 100644 --- a/feedgen/feed.py +++ b/feedgen/feed.py @@ -881,7 +881,7 @@ class FeedGenerator(object): if not (isinstance(hours, list) or isinstance(hours, set)): hours = [hours] for h in hours: - if not h in xrange(24): + if not h in range(24): raise ValueError('Invalid hour %s' % h) if replace or not self.__rss_skipHours: self.__rss_skipHours = set()