From 768bdc2d8eaee4728a6dfe29e917b048f7aeea0a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 30 Jun 2017 11:19:34 +0530 Subject: [PATCH] Linux: Fix an error when trying to use a program by path with the Open with functionality. --- src/calibre/gui2/open_with.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/open_with.py b/src/calibre/gui2/open_with.py index dff5f3c78e..fc4a4a3b4a 100644 --- a/src/calibre/gui2/open_with.py +++ b/src/calibre/gui2/open_with.py @@ -218,7 +218,10 @@ else: pmap = ic.pixmap(48, 48) if not pmap.isNull(): entry['icon_data'] = pixmap_to_data(pmap) - entry['MimeType'] = tuple(entry['MimeType']) + try: + entry['MimeType'] = tuple(entry['MimeType']) + except KeyError: + entry['MimeType'] = () return entry # }}}