From b14e8904032da55f9408bc7846faa7c7c2edb8e8 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sat, 23 Apr 2011 13:02:20 +0100 Subject: [PATCH] Improve error handling when sorting date-subtype composite columns --- src/calibre/library/caches.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index 663b2b71ab..16661056e8 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -1005,9 +1005,9 @@ class SortKeyGenerator(object): if sb == 'date': try: val = parse_date(val) - dt = 'datetime' except: - pass + val = UNDEFINED_DATE + dt = 'datetime' elif sb == 'number': try: val = float(val)