From 3447684c5ec8e2d291b3cb24b3992d5596968f6c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Dec 2013 13:11:20 +0530 Subject: [PATCH] Specific error message if file being tweaked does not exist --- src/calibre/gui2/tweak_book/boss.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index 2295e7102b..f7ec61865e 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -121,6 +121,9 @@ class Boss(QObject): _('Tweaking is only supported for books in the %s formats.' ' Convert your book to one of these formats first.') % _(' and ').join(sorted(SUPPORTED)), show=True) + if not os.path.exists(path): + return error_dialog(self.gui, _('File not found'), _( + 'The file %s does not exist.') % path, show=True) for name in tuple(editors): self.close_editor(name)