Typo in python version check
parent
624fa47f4f
commit
8a1c00abf0
|
@ -208,7 +208,7 @@ class BaseCacheHandler(BaseHandler):
|
||||||
def _load(self, url):
|
def _load(self, url):
|
||||||
out = list(self.load(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
|
out[2] = email.message_from_string(out[2] or unicode()) # headers
|
||||||
else:
|
else:
|
||||||
out[2] = mimetools.Message(StringIO(out[2] or unicode()))
|
out[2] = mimetools.Message(StringIO(out[2] or unicode()))
|
||||||
|
|
|
@ -380,7 +380,7 @@ class FeedParser(FeedBase):
|
||||||
out = StringIO()
|
out = StringIO()
|
||||||
c = csv.writer(out, dialect=csv.excel)
|
c = csv.writer(out, dialect=csv.excel)
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
if sys.version_info[0] > '3':
|
if sys.version_info[0] >= 3:
|
||||||
row = [x[1] for x in item]
|
row = [x[1] for x in item]
|
||||||
else:
|
else:
|
||||||
row = [x[1].encode('utf-8') if isinstance(x[1], unicode) else x[1] for x in item]
|
row = [x[1].encode('utf-8') if isinstance(x[1], unicode) else x[1] for x in item]
|
||||||
|
|
Loading…
Reference in New Issue