From ae3c0416db65155bcbb7807ace95558de0b31baa Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 17 Sep 2018 23:38:19 +1000 Subject: [PATCH] fix catch of access denied error --- aqt/profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/profiles.py b/aqt/profiles.py index d382fcfe8..6b7c58e08 100644 --- a/aqt/profiles.py +++ b/aqt/profiles.py @@ -214,7 +214,7 @@ a flash drive.""" % self.base) os.rename(oldFolder, newFolder) except WindowsError as e: self.db.rollback() - if "Access is denied" in e: + if "Access is denied" in str(e): showWarning(_("""\ Anki could not rename your profile because it could not rename the profile \ folder on disk. Please ensure you have permission to write to Documents/Anki \