fix keyring import bug

This commit is contained in:
Ondřej Samohel 2020-11-23 18:50:28 +01:00
parent bfff689926
commit 38ed825d7d
No known key found for this signature in database
GPG key ID: 8A29C663C672C2B7
5 changed files with 19 additions and 9 deletions

View file

@ -19,6 +19,8 @@ class InstallDialog(QtWidgets.QDialog):
def __init__(self, parent=None):
super(InstallDialog, self).__init__(parent)
self._mongo_url = ""
self.setWindowTitle("Pype - Configure Pype repository path")
self._icon_path = os.path.join(
os.path.dirname(__file__), 'pype_icon.png')
@ -147,10 +149,10 @@ class InstallDialog(QtWidgets.QDialog):
self.setLayout(mongo_layout)
def _mongo_changed(self, mongo: str):
self._mongo_url = mongo
self.parent()._mongo_url = mongo
def get_mongo_url(self):
return self._mongo_url
return self.parent()._mongo_url
def set_valid(self):
self._mongo_input.setStyleSheet(

View file

@ -74,10 +74,10 @@ def boot():
____________
/\ ___ \
\ \ \/_\ \
\ \ _____/ ______ ___ ___ ___
\ \ \___/ /\ \ \ \\ \\ \
\ \____\ \ \_____\ \__\\__\\__\
\/____/ \/_____/ . PYPE Club .
\ \ _____/ ___ ___ ___
\ \ \___/ ---- \ \\ \\ \
\ \____\ / \____\ \__\\__\\__\
\/____/ \/____/ . PYPE Club .
"""

View file

@ -8,6 +8,7 @@ import json
from typing import Any
from functools import lru_cache
from pathlib import Path
import platform
import appdirs
import keyring
@ -29,6 +30,12 @@ class ASettingRegistry(ABC):
def __init__(self, name: str):
super(ASettingRegistry, self).__init__()
# hack for cx_freeze and Windows keyring backend
if platform.system() == "Windows":
from keyring.backends import Windows
keyring.set_keyring(Windows.WinVaultKeyring())
self._name = name
self._items = {}

View file

@ -6,7 +6,7 @@ Click
clique==1.5.0
coverage
cx_Freeze
ftrack-python-api
ftrack-python-api==2.0.0
ffmpeg-python
google-api-python-client
jsonschema
@ -15,7 +15,7 @@ log4mongo
OpenTimelineIO
pathlib2
Pillow
pyinput
pynput
pymongo
pytest
pytest-cov

View file

@ -22,7 +22,8 @@ install_requires = [
"PIL",
"pymongo",
"Qt",
"speedcopy"
"speedcopy",
"win32ctypes"
]
base = None