mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-18 19:03:44 +01:00
Guard against invalid skip_dialog_name
This commit is contained in:
parent
7c06692233
commit
f8cfbbe383
1 changed files with 6 additions and 1 deletions
|
|
@ -407,7 +407,12 @@ def question_dialog(parent, title, msg, det_msg='', show_copy_button=False,
|
|||
):
|
||||
from calibre.gui2.dialogs.message_box import MessageBox
|
||||
|
||||
auto_skip = set(gprefs.get('questions_to_auto_skip', []))
|
||||
if not isinstance(skip_dialog_name, unicode_type):
|
||||
skip_dialog_name = None
|
||||
try:
|
||||
auto_skip = set(gprefs.get('questions_to_auto_skip', ()))
|
||||
except Exception:
|
||||
auto_skip = set()
|
||||
if (skip_dialog_name is not None and skip_dialog_name in auto_skip):
|
||||
return bool(skip_dialog_skipped_value)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue