diff --git a/aqt/profiles.py b/aqt/profiles.py index a436e907d..f0444fe5e 100644 --- a/aqt/profiles.py +++ b/aqt/profiles.py @@ -231,6 +231,11 @@ and no other programs are accessing your profile folders, then try again.""")) new = not os.path.exists(path) def recover(): # if we can't load profile, start with a new one + if self.db: + try: + self.db.close() + except: + pass broken = path+".broken" if os.path.exists(broken): os.unlink(broken)