mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
handler errors without 'type' set
This commit is contained in:
parent
619d2bcbaf
commit
470a501caa
1 changed files with 1 additions and 1 deletions
|
@ -621,7 +621,7 @@ new:
|
||||||
try:
|
try:
|
||||||
self.deck = DeckStorage.Deck(deckPath)
|
self.deck = DeckStorage.Deck(deckPath)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if hasattr(e, 'data') and e.data['type'] == 'inuse':
|
if hasattr(e, 'data') and e.data.get('type') == 'inuse':
|
||||||
if interactive:
|
if interactive:
|
||||||
ui.utils.showInfo(_("Deck is already open."))
|
ui.utils.showInfo(_("Deck is already open."))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue