Skip to content

Commit

Permalink
More robust against buggy FileType plugins on book import
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Dec 5, 2014
1 parent 2791ba0 commit 54909e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/calibre/ebooks/metadata/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def run_import_plugins(paths, group_id, tdir):
for path in paths:
if not os.access(path, os.R_OK):
continue
nfp = run_plugins_on_import(path)
try:
nfp = run_plugins_on_import(path)
except Exception:
nfp = None
import traceback
traceback.print_exc()
if nfp and os.access(nfp, os.R_OK) and not samefile(nfp, path):
# Ensure that the filename is preserved so that
# reading metadata from filename is not broken
Expand Down

0 comments on commit 54909e3

Please sign in to comment.