mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 12:46:01 +08:00
Merge branch 'CURA-8490_Make_sure_no_keyring_backend_is_available_on_Linux' into 4.11
This commit is contained in:
commit
1c9b3a0784
@ -14,13 +14,17 @@ if TYPE_CHECKING:
|
|||||||
# Need to do some extra workarounds on windows:
|
# Need to do some extra workarounds on windows:
|
||||||
import sys
|
import sys
|
||||||
from UM.Platform import Platform
|
from UM.Platform import Platform
|
||||||
if Platform.isWindows() and hasattr(sys, "frozen"):
|
if Platform.isWindows():
|
||||||
import win32timezone
|
import win32timezone
|
||||||
from keyring.backends.Windows import WinVaultKeyring
|
from keyring.backends.Windows import WinVaultKeyring
|
||||||
keyring.set_keyring(WinVaultKeyring())
|
keyring.set_keyring(WinVaultKeyring())
|
||||||
if Platform.isOSX() and hasattr(sys, "frozen"):
|
if Platform.isOSX():
|
||||||
from keyring.backends.macOS import Keyring
|
from keyring.backends.macOS import Keyring
|
||||||
keyring.set_keyring(Keyring())
|
keyring.set_keyring(Keyring())
|
||||||
|
if Platform.isLinux():
|
||||||
|
# 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 as NoKeyringBackend
|
||||||
|
keyring.set_keyring(NoKeyringBackend())
|
||||||
|
|
||||||
# Even if errors happen, we don't want this stored locally:
|
# Even if errors happen, we don't want this stored locally:
|
||||||
DONT_EVER_STORE_LOCALLY: List[str] = ["refresh_token"]
|
DONT_EVER_STORE_LOCALLY: List[str] = ["refresh_token"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user