Fix calibredb list on windows

This commit is contained in:
Kovid Goyal 2008-08-04 18:11:59 -07:00
parent eb95b6c693
commit 265a618881

View File

@ -42,7 +42,7 @@ def do_list(db, fields, sort_by, ascending, search_text):
widths = list(map(lambda x : 0, fields))
for i in db.data:
for j, field in enumerate(fields):
widths[j] = max(widths[j], len(unicode(i[field])))
widths[j] = max(widths[j], len(unicode(i[str(field)])))
screen_width = terminal_controller.COLS
if not screen_width: