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,8 +243,9 @@ def reset_feed(session, feed_id):
|
|||||||
# TODO implement reset
|
# TODO implement reset
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
streamWriter = codecs.lookup('utf-8')[-1]
|
if (sys.stdout.encoding is None):
|
||||||
sys.stdout = streamWriter(sys.stdout)
|
streamWriter = codecs.lookup('utf-8')[-1]
|
||||||
|
sys.stdout = streamWriter(sys.stdout)
|
||||||
|
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
config.read('atomstrom.conf')
|
config.read('atomstrom.conf')
|
||||||
|
Loading…
Reference in New Issue
Block a user