Fix skipHours for Python 3

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.
This commit is contained in:
snipem 2014-06-02 23:08:50 +02:00
parent a6300a13ab
commit 0907e993e4

View file

@ -881,7 +881,7 @@ class FeedGenerator(object):
if not (isinstance(hours, list) or isinstance(hours, set)): if not (isinstance(hours, list) or isinstance(hours, set)):
hours = [hours] hours = [hours]
for h in hours: for h in hours:
if not h in xrange(24): if not h in range(24):
raise ValueError('Invalid hour %s' % h) raise ValueError('Invalid hour %s' % h)
if replace or not self.__rss_skipHours: if replace or not self.__rss_skipHours:
self.__rss_skipHours = set() self.__rss_skipHours = set()