From 440d87d627fa3606344d599bfff57b483624460b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 26 Feb 2015 16:28:54 +0530 Subject: [PATCH] ... --- src/calibre/gui2/open_with.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/open_with.py b/src/calibre/gui2/open_with.py index 1a85455ac3..aae33f21e7 100644 --- a/src/calibre/gui2/open_with.py +++ b/src/calibre/gui2/open_with.py @@ -109,6 +109,8 @@ else: name, lang = parse_localized_key(k) if name not in ans: ans[name] = {} + if isinstance(ans[name], type('')): + ans[name] = {None:ans[name]} ans[name][lang] = v else: ans[k] = v @@ -223,6 +225,8 @@ else: try: data = parse_desktop_file(path) except Exception: + import traceback + traceback.print_exc() continue if data is not None and mime_types.intersection(data['MimeType']): icon = data.get('Icon', {}).get(None)