mirror of https://github.com/borgbase/vorta
Minor: Add hidden keyring imports for macOS
This commit is contained in:
parent
7dc6f83b92
commit
2b009c517f
|
@ -28,6 +28,9 @@ a = Analysis([os.path.join(SRC_DIR, '__main__.py')],
|
|||
hiddenimports=[
|
||||
'vorta.views.dark.collection_rc',
|
||||
'vorta.views.light.collection_rc',
|
||||
'vorta.keyring.darwin',
|
||||
'vorta.keyring.kwallet',
|
||||
'vorta.keyring.secretstorage',
|
||||
'pkg_resources.py2_warn',
|
||||
],
|
||||
hookspath=[],
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import importlib
|
||||
import logging
|
||||
from vorta.i18n import trans_late
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class VortaKeyring:
|
||||
all_keyrings = [
|
||||
|
@ -20,13 +23,15 @@ class VortaKeyring:
|
|||
try:
|
||||
keyring = getattr(importlib.import_module(_module, package='vorta.keyring'), _class)
|
||||
available_keyrings.append((keyring, keyring.get_priority()))
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logger.debug(e)
|
||||
continue
|
||||
|
||||
for keyring, _ in sorted(available_keyrings, key=lambda k: k[1], reverse=True):
|
||||
try:
|
||||
return keyring()
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
logger.debug(e)
|
||||
continue
|
||||
|
||||
def get_backend_warning(self):
|
||||
|
|
Loading…
Reference in New Issue