From a92aea1f27591b79f028bdeca2d945decca5e3ed Mon Sep 17 00:00:00 2001 From: ospalh Date: Tue, 23 Apr 2013 15:37:21 +0200 Subject: [PATCH] Fix the return value of aqt.main.unloadCollection() (True if there is no col... --- aqt/main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/aqt/main.py b/aqt/main.py index 40b4c7add..9397fb656 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -258,7 +258,13 @@ how to restore from a backup.""") self.moveToState("deckBrowser") def unloadCollection(self): - "True if unload successful." + """ + Unload the collection. + + This unloads a collection if ther is one and returns True if + there is no collection after the call. (Because the unload + worked or because there was no collection to start with.) + """ if self.col: if not self.closeAllCollectionWindows(): return @@ -268,7 +274,8 @@ how to restore from a backup.""") self.progress.start(immediate=True) self.backup() self.progress.finish() - return True + return True + # Backup and auto-optimize ##########################################################################