Fix issue #184
This commit is contained in:
parent
f385019fa4
commit
a58aa6de54
@ -32,6 +32,7 @@ before_install:
|
||||
|
||||
install:
|
||||
- pip3 install twisted appnope
|
||||
- pip3 install -U https://github.com/requests/requests/zipball/master
|
||||
|
||||
|
||||
before_deploy:
|
||||
|
||||
@ -15,7 +15,7 @@ DATA_FILES = [
|
||||
]
|
||||
OPTIONS = {
|
||||
'iconfile':'resources/icon.icns',
|
||||
'includes': {'PySide2.QtCore', 'PySide2.QtUiTools', 'PySide2.QtGui','PySide2.QtWidgets'},
|
||||
'includes': {'PySide2.QtCore', 'PySide2.QtUiTools', 'PySide2.QtGui','PySide2.QtWidgets', 'certifi'},
|
||||
'excludes': {'PySide', 'PySide.QtCore', 'PySide.QtUiTools', 'PySide.QtGui'},
|
||||
'qt_plugins': ['platforms/libqcocoa.dylib', 'platforms/libqminimal.dylib','platforms/libqoffscreen.dylib'],
|
||||
'plist': {
|
||||
|
||||
@ -721,8 +721,8 @@ info = dict(
|
||||
options={'py2exe': {
|
||||
'dist_dir': OUT_DIR,
|
||||
'packages': 'PySide2.QtUiTools',
|
||||
'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide2, liburl, ast, unicodedata',
|
||||
'excludes': 'venv, _ssl, doctest, pdb, unittest, win32clipboard, win32file, win32pdh, win32security, win32trace, win32ui, winxpgui, win32pipe, win32process, Tkinter',
|
||||
'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide2, liburl, ast, unicodedata, _ssl',
|
||||
'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32file, win32pdh, win32security, win32trace, win32ui, winxpgui, win32pipe, win32process, Tkinter',
|
||||
'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll',
|
||||
'optimize': 2,
|
||||
'compressed': 1
|
||||
|
||||
@ -11,7 +11,8 @@ from twisted.internet import reactor, task, defer, threads
|
||||
from functools import wraps
|
||||
from copy import deepcopy
|
||||
from syncplay.protocols import SyncClientProtocol
|
||||
from syncplay import utils, constants
|
||||
from syncplay import utils, constants, version
|
||||
from syncplay.utils import isMacOS
|
||||
from syncplay.messages import getMissingStrings, getMessage
|
||||
from syncplay.constants import PRIVACY_SENDHASHED_MODE, PRIVACY_DONTSEND_MODE, \
|
||||
PRIVACY_HIDDENFILENAME
|
||||
@ -908,9 +909,12 @@ class SyncplayClient(object):
|
||||
def checkForUpdate(self, userInitiated):
|
||||
try:
|
||||
import urllib.request, urllib.parse, urllib.error, syncplay, sys, json
|
||||
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number,
|
||||
'language': syncplay.messages.messages["CURRENT"], 'platform': sys.platform, 'userInitiated': userInitiated})
|
||||
|
||||
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number, 'language': syncplay.messages.messages["CURRENT"], 'platform': sys.platform, 'userInitiated': userInitiated})
|
||||
if isMacOS():
|
||||
import requests
|
||||
response = requests.get(constants.SYNCPLAY_UPDATE_URL.format(params))
|
||||
response = response.text
|
||||
else:
|
||||
f = urllib.request.urlopen(constants.SYNCPLAY_UPDATE_URL.format(params))
|
||||
response = f.read()
|
||||
response = response.decode('utf-8')
|
||||
|
||||
@ -20,6 +20,7 @@ class GuiConfiguration:
|
||||
self.config = config
|
||||
self._availablePlayerPaths = []
|
||||
self.error = error
|
||||
constants.DEBUG_MODE = config['debug']
|
||||
|
||||
def run(self):
|
||||
if QCoreApplication.instance() is None:
|
||||
@ -342,7 +343,7 @@ class ConfigDialog(QtWidgets.QDialog):
|
||||
try:
|
||||
servers = utils.getListOfPublicServers()
|
||||
except IOError as e:
|
||||
self.showErrorMessage(str(e))
|
||||
self.showErrorMessage(e.args[0])
|
||||
return
|
||||
currentServer = self.hostCombobox.currentText()
|
||||
self.hostCombobox.clear()
|
||||
|
||||
@ -14,6 +14,7 @@ import ast
|
||||
import unicodedata
|
||||
import platform
|
||||
import subprocess
|
||||
import traceback
|
||||
|
||||
folderSearchEnabled = True
|
||||
|
||||
@ -375,9 +376,13 @@ def open_system_file_browser(path):
|
||||
|
||||
def getListOfPublicServers():
|
||||
try:
|
||||
import urllib.request, urllib.parse, urllib.error, syncplay, sys, json
|
||||
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number,
|
||||
'language': syncplay.messages.messages["CURRENT"]})
|
||||
import urllib.request, urllib.parse, urllib.error, syncplay, sys
|
||||
params = urllib.parse.urlencode({'version': syncplay.version, 'milestone': syncplay.milestone, 'release_number': syncplay.release_number, 'language': syncplay.messages.messages["CURRENT"]})
|
||||
if isMacOS():
|
||||
import requests
|
||||
response = requests.get(constants.SYNCPLAY_PUBLIC_SERVER_LIST_URL.format(params))
|
||||
response = response.text
|
||||
else:
|
||||
f = urllib.request.urlopen(constants.SYNCPLAY_PUBLIC_SERVER_LIST_URL.format(params))
|
||||
response = f.read()
|
||||
response = response.decode('utf-8')
|
||||
@ -389,6 +394,10 @@ def getListOfPublicServers():
|
||||
else:
|
||||
raise IOError
|
||||
except:
|
||||
if constants.DEBUG_MODE == True:
|
||||
traceback.print_exc()
|
||||
raise
|
||||
else:
|
||||
raise IOError(getMessage("failed-to-load-server-list-error"))
|
||||
|
||||
class RoomPasswordProvider(object):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user