once again: fix encoding issues
This commit is contained in:
parent
58177038c3
commit
103d7d4a28
@ -220,7 +220,7 @@ def list_all_feeds(session):
|
|||||||
totalfeeds = 0
|
totalfeeds = 0
|
||||||
totalentries = 0
|
totalentries = 0
|
||||||
for feed in allfeeds:
|
for feed in allfeeds:
|
||||||
print unicode(feed)
|
print feed
|
||||||
totalfeeds += 1
|
totalfeeds += 1
|
||||||
totalentries += len(feed.entry)
|
totalentries += len(feed.entry)
|
||||||
print 'TOTAL: %d entries in %d feeds.' % (totalentries, totalfeeds)
|
print 'TOTAL: %d entries in %d feeds.' % (totalentries, totalfeeds)
|
||||||
@ -243,6 +243,7 @@ def reset_feed(session, feed_id):
|
|||||||
# TODO implement reset
|
# TODO implement reset
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
if (sys.stdout.encoding is None):
|
||||||
streamWriter = codecs.lookup('utf-8')[-1]
|
streamWriter = codecs.lookup('utf-8')[-1]
|
||||||
sys.stdout = streamWriter(sys.stdout)
|
sys.stdout = streamWriter(sys.stdout)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user