From 470a501caa3a9d4e763482e085356f2934d759ca Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 2 Jun 2009 03:20:28 +0900 Subject: [PATCH] handler errors without 'type' set --- ankiqt/ui/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 8781ef844..821052816 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -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: