mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 11:59:02 +08:00
Also catch unknown keyring errors
We're confident now that we get it to not crash for most normal cases. If there is a crash here it's due to the internals of Keyring. We're catching all of the others separately anyway. Fixes Sentry issue CURA-340.
This commit is contained in:
parent
5567cc480e
commit
006b5e25b2
@ -5,7 +5,7 @@ from typing import Type, TYPE_CHECKING, Optional, List
|
|||||||
from io import BlockingIOError
|
from io import BlockingIOError
|
||||||
import keyring
|
import keyring
|
||||||
from keyring.backend import KeyringBackend
|
from keyring.backend import KeyringBackend
|
||||||
from keyring.errors import NoKeyringError, PasswordSetError, KeyringLocked
|
from keyring.errors import NoKeyringError, PasswordSetError, KeyringLocked, KeyringError
|
||||||
|
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
|
||||||
@ -53,6 +53,10 @@ class KeyringAttribute:
|
|||||||
self._store_secure = False
|
self._store_secure = False
|
||||||
Logger.log("w", "The password retrieved from the keyring cannot be used because it contains characters that cannot be decoded.")
|
Logger.log("w", "The password retrieved from the keyring cannot be used because it contains characters that cannot be decoded.")
|
||||||
return getattr(instance, self._name)
|
return getattr(instance, self._name)
|
||||||
|
except KeyringError:
|
||||||
|
self._store_secure = False
|
||||||
|
Logger.logException("w", "Unknown keyring error.")
|
||||||
|
return getattr(instance, self._name)
|
||||||
else:
|
else:
|
||||||
return getattr(instance, self._name)
|
return getattr(instance, self._name)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user