diff --git a/src/calibre/devices/usbms/books.py b/src/calibre/devices/usbms/books.py index 4a74f68349..9e19e9c66d 100644 --- a/src/calibre/devices/usbms/books.py +++ b/src/calibre/devices/usbms/books.py @@ -237,7 +237,10 @@ class CollectionsBookList(BookList): return 1 if y is None: return -1 - c = cmp(sort_key(x), sort_key(y)) + if isinstance(x, unicode): + c = cmp(sort_key(x), sort_key(y)) + else: + c = cmp(x, y) if c != 0: return c # same as above -- no sort_key needed here