Browse Source

Fix mypy complaint

The `Keyring` is already imported from MacOS, so it's best to rename the fail on for Linux.

CURA-8490
Konstantinos Karmas 3 years ago
parent
commit
c5a956068f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cura/OAuth2/KeyringAttribute.py

+ 2 - 2
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"]