From dd5b3bacc857ed12ce99668f2c501f7ddb61f1cd Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 6 Jun 2009 22:27:00 +0900 Subject: [PATCH] if the file is in use, hide from browser but don't forget --- ankiqt/ui/main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 88d2b3768..35a884bc6 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -1003,9 +1003,12 @@ your deck.""")) continue try: deck = DeckStorage.Deck(d, backup=False) - except: - toRemove.append(d) - continue + except Exception, e: + if not "File is in use" in str(e): + print "remove" + toRemove.append(d) + else: + continue self.browserDecks.append({ 'path': d, 'name': deck.name(),