From d9b67936161e8e9fcb4ad04d949aded673c75638 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 3 Aug 2020 10:24:49 +1000 Subject: [PATCH] fix automatic logout on auth failure not working --- qt/aqt/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/sync.py b/qt/aqt/sync.py index 82ef4cf1b..b81390adb 100644 --- a/qt/aqt/sync.py +++ b/qt/aqt/sync.py @@ -61,7 +61,7 @@ def get_sync_status(mw: aqt.main.AnkiQt, callback: Callable[[SyncStatus], None]) def handle_sync_error(mw: aqt.main.AnkiQt, err: Exception): if isinstance(err, SyncError): - if err.kind == SyncErrorKind.AUTH_FAILED: + if err.kind() == SyncErrorKind.AUTH_FAILED: mw.pm.clear_sync_auth() elif isinstance(err, Interrupted): # no message to show