mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -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:
|
||||
self.deck = DeckStorage.Deck(deckPath)
|
||||
except Exception, e:
|
||||
if hasattr(e, 'data') and e.data['type'] == 'inuse':
|
||||
if hasattr(e, 'data') and e.data.get('type') == 'inuse':
|
||||
if interactive:
|
||||
ui.utils.showInfo(_("Deck is already open."))
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue