Remove check for "frozen" when setting the keyring backend

There is no need to have a different behavior from source compared to frozen builds when it comes to the keyring.

CURA-8490
This commit is contained in:
Konstantinos Karmas 2021-08-18 16:54:28 +02:00
parent c5a956068f
commit d218b0bff9

View file

@ -14,14 +14,14 @@ 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() and hasattr(sys, "frozen"): 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. # 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 from keyring.backends.fail import Keyring as NoKeyringBackend
keyring.set_keyring(NoKeyringBackend()) keyring.set_keyring(NoKeyringBackend())