From 24b9a9d1a8e1d1a978de2e347074d3116c838380 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 11 Jan 2010 19:28:50 +0900 Subject: [PATCH] update deck corrupt messages, include debug info --- ankiqt/ui/main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 116443266..9c788dd29 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -682,12 +682,10 @@ new: ui.utils.showWarning(_("Deck is already open.")) else: return - elif hasattr(e, 'data') and e.data.get('type') == 'corrupt': - ui.utils.showCritical(_("\ -File is corrupt.\nPlease restore from backup."), help="DeckErrors") else: ui.utils.showCritical(_("""\ -File is corrupt or not an Anki database."""), help="DeckErrors") +File is corrupt or not an Anki database. Click help for more info.\n +Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors") self.moveToState("noDeck") return 0 if media is not None: