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)):
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()