From c5a956068f7cac7604279dfe2f4e275e1cc5af89 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 18 Aug 2021 12:02:13 +0200 Subject: [PATCH] Fix mypy complaint The `Keyring` is already imported from MacOS, so it's best to rename the fail on for Linux. CURA-8490 --- cura/OAuth2/KeyringAttribute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/OAuth2/KeyringAttribute.py b/cura/OAuth2/KeyringAttribute.py index 7d399077f5..70d445d921 100644 --- a/cura/OAuth2/KeyringAttribute.py +++ b/cura/OAuth2/KeyringAttribute.py @@ -23,8 +23,8 @@ if Platform.isOSX() and hasattr(sys, "frozen"): keyring.set_keyring(Keyring()) if Platform.isLinux() and hasattr(sys, "frozen"): # We do not support the keyring on Linux, so make sure no Keyring backend is loaded, even if there is a system one. - from keyring.backends.fail import Keyring - keyring.set_keyring(Keyring()) + from keyring.backends.fail import Keyring as NoKeyringBackend + keyring.set_keyring(NoKeyringBackend()) # Even if errors happen, we don't want this stored locally: DONT_EVER_STORE_LOCALLY: List[str] = ["refresh_token"]