From 71605407dd35b4dd681927fcfed76b4cf3a0ee4d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 9 Dec 2016 08:46:48 +0530 Subject: [PATCH] Be a little more defensive --- src/calibre/customize/ui.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calibre/customize/ui.py b/src/calibre/customize/ui.py index 32487e74f8..f4ae5dbf60 100644 --- a/src/calibre/customize/ui.py +++ b/src/calibre/customize/ui.py @@ -162,9 +162,10 @@ def _run_filetype_plugins(path_to_file, ft=None, occasion='preprocess'): with plugin: try: plugin.original_path_to_file = path_to_file - nfp = plugin.run(path_to_file) - if not nfp: - nfp = path_to_file + except Exception: + pass + try: + nfp = plugin.run(path_to_file) or path_to_file except: print >>oe, 'Running file type plugin %s failed with traceback:'%plugin.name traceback.print_exc(file=oe)