From aa0c0ada63607f0eddfb5e98339f864fe811d6e8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 7 Jun 2010 12:09:53 -0600 Subject: [PATCH] ... --- src/calibre/devices/prs500/cli/main.py | 2 +- src/calibre/devices/prs505/sony_cache.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/prs500/cli/main.py b/src/calibre/devices/prs500/cli/main.py index 6ad5fe2087..cd8395467b 100755 --- a/src/calibre/devices/prs500/cli/main.py +++ b/src/calibre/devices/prs500/cli/main.py @@ -337,7 +337,7 @@ def main(): dev.touch(args[0]) elif command == 'test_file': parser = OptionParser(usage=("usage: %prog test_file path\n" - 'Open device, copy file psecified by path to device and ' + 'Open device, copy file specified by path to device and ' 'then eject device.')) options, args = parser.parse_args(args) if len(args) != 1: diff --git a/src/calibre/devices/prs505/sony_cache.py b/src/calibre/devices/prs505/sony_cache.py index d5aa88bf5b..0fd96a2334 100644 --- a/src/calibre/devices/prs505/sony_cache.py +++ b/src/calibre/devices/prs505/sony_cache.py @@ -290,7 +290,7 @@ class XMLCache(object): lpath_map = self.build_lpath_map(root) for book in bl: - record = lpath_map[book.lpath] + record = lpath_map.get(book.lpath, None) if record is not None: title = record.get('title', None) if title is not None and title != book.title: