From 3706c371fb3c0e6e0ac6ca0c56dab38c82ba01d9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 10 Sep 2010 01:48:16 -0600 Subject: [PATCH] Allow book_on_device to be called before set_books_in_library --- src/calibre/gui2/device.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index e002fe916b..46259deb04 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -1325,6 +1325,9 @@ class DeviceMixin(object): # {{{ self.book_db_uuid_path_map = None return + if not hasattr(self, 'db_book_uuid_cache'): + return loc + string_pat = re.compile('(?u)\W|[_]') def clean_string(x): x = x.lower() if x else ''