Update keyring code to work with nuitka3

develop
knotteye 2021-04-16 21:00:21 -05:00
parent 411198c3ff
commit 1ccd67e956
1 changed files with 15 additions and 2 deletions

View File

@ -25,12 +25,25 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
################################################################################ ################################################################################
import platform, keyring
os = platform.system()
if os == "Windows":
import keyring.backends.Windows
keyring.set_keyring(keyring.backends.Windows.WinVaultKeyring())
elif os == "Darwin":
import keyring.backends.OS_X
keyring.set_keyring(keyring.backends.OS_X.Keyring())
else:
# Probably linux or BSD so we'll just go for it
import keyring.backends.SecretService
keyring.set_keyring(keyring.backends.SecretService.Keyring())
from qtpy.QtGui import * from qtpy.QtGui import *
from qtpy.QtCore import * from qtpy.QtCore import *
from qtpy.QtWidgets import * from qtpy.QtWidgets import *
from notifypy import Notify from notifypy import Notify
import sys, keyring, threading, queue, asyncio, urllib, appdirs, os, time, pleroma, re, magic, monkeypatch, requests, misc, json, timeconvert, videowidget, audiowidget import sys, threading, queue, asyncio, urllib, appdirs, os, time, pleroma, re, magic, monkeypatch, requests, misc, json, timeconvert, videowidget, audiowidget
CACHE = appdirs.AppDirs('plchat', 'plchat').user_cache_dir CACHE = appdirs.AppDirs('plchat', 'plchat').user_cache_dir
APPDATA = appdirs.AppDirs('plchat', 'plchat').user_data_dir APPDATA = appdirs.AppDirs('plchat', 'plchat').user_data_dir
THREADS = {} THREADS = {}