Fix #2864 (ebook-convert --list-recipes fails with UnicodeEncodeError (0.6.0b14))

This commit is contained in:
Kovid Goyal 2009-07-19 09:34:15 -06:00
parent d1aabbaa1f
commit 2f8d95124e

View File

@ -615,7 +615,10 @@ OptionRecommendation(name='list_recipes',
from calibre.web.feeds.recipes import titles
self.log('Available recipes:')
for title in sorted(titles):
try:
self.log('\t'+title)
except:
self.log('\t'+repr(title))
self.log('%d recipes available'%len(titles))
raise SystemExit(0)
self.flush()