Typo in python version check

master
pictuga 2015-08-28 19:29:09 +02:00
parent 624fa47f4f
commit 8a1c00abf0
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ class BaseCacheHandler(BaseHandler):
def _load(self, url):
out = list(self.load(url))
if sys.version_info[0] > '3':
if sys.version_info[0] >= 3:
out[2] = email.message_from_string(out[2] or unicode()) # headers
else:
out[2] = mimetools.Message(StringIO(out[2] or unicode()))

View File

@ -380,7 +380,7 @@ class FeedParser(FeedBase):
out = StringIO()
c = csv.writer(out, dialect=csv.excel)
for item in self.items:
if sys.version_info[0] > '3':
if sys.version_info[0] >= 3:
row = [x[1] for x in item]
else:
row = [x[1].encode('utf-8') if isinstance(x[1], unicode) else x[1] for x in item]