diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py index 5039331660..c237e15dff 100644 --- a/src/calibre/__init__.py +++ b/src/calibre/__init__.py @@ -202,7 +202,7 @@ def extract(path, dir): def get_proxies(debug=True): proxies = getproxies() for key, proxy in list(proxies.items()): - if not proxy: + if not proxy or '..' in proxy: del proxies[key] continue if proxy.startswith(key+'://'): diff --git a/src/calibre/devices/prs505/books.py b/src/calibre/devices/prs505/books.py index ee5209c563..406a139fd1 100644 --- a/src/calibre/devices/prs505/books.py +++ b/src/calibre/devices/prs505/books.py @@ -284,7 +284,12 @@ class BookList(_BookList): plitems = [] for pl in self.playlists(): for c in pl.childNodes: - if hasattr(c, 'tagName') and c.tagName.endswith('item'): + if hasattr(c, 'tagName') and c.tagName.endswith('item') and \ + hasattr(c, 'getAttribute'): + try: + c.getAttribute('id') + except: # Unlinked node + continue plitems.append(c) return plitems