mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Fix wrong Interrupted Exception being checked
This commit is contained in:
parent
2acad4504e
commit
2491b966b5
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ from typing import TYPE_CHECKING, Optional, TextIO, cast
|
||||||
from markdown import markdown
|
from markdown import markdown
|
||||||
|
|
||||||
import aqt
|
import aqt
|
||||||
from anki.errors import DocumentedError, LocalizedError
|
from anki.errors import DocumentedError, Interrupted, LocalizedError
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from aqt.utils import showText, showWarning, supportText, tr
|
from aqt.utils import showText, showWarning, supportText, tr
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
def show_exception(*, parent: QWidget, exception: Exception) -> None:
|
def show_exception(*, parent: QWidget, exception: Exception) -> None:
|
||||||
"Present a caught exception to the user using a pop-up."
|
"Present a caught exception to the user using a pop-up."
|
||||||
if isinstance(exception, InterruptedError):
|
if isinstance(exception, Interrupted):
|
||||||
# nothing to do
|
# nothing to do
|
||||||
return
|
return
|
||||||
help_page = exception.help_page if isinstance(exception, DocumentedError) else None
|
help_page = exception.help_page if isinstance(exception, DocumentedError) else None
|
||||||
|
|
Loading…
Reference in a new issue