handler errors without 'type' set

This commit is contained in:
Damien Elmes 2009-06-02 03:20:28 +09:00
parent 619d2bcbaf
commit 470a501caa

View file

@ -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: