mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-21 09:34:08 +03:00
minor fixes for 3.5
This commit is contained in:
parent
f158235f16
commit
df82c3854c
@ -151,6 +151,8 @@ class UDSClient(QtWidgets.QMainWindow):
|
||||
return
|
||||
except Exception as e:
|
||||
self.showError(e)
|
||||
self.closeWindow()
|
||||
return
|
||||
|
||||
self.getTransportData()
|
||||
|
||||
|
@ -127,6 +127,8 @@ class RestApi:
|
||||
raise InvalidVersion(downloadUrl)
|
||||
|
||||
return self._serverVersion
|
||||
except InvalidVersion:
|
||||
raise
|
||||
except Exception as e:
|
||||
raise UDSException(e)
|
||||
|
||||
|
@ -52,7 +52,7 @@ if typing.TYPE_CHECKING:
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
#CLIENT_VERSION = UDS_VERSION
|
||||
REQUIRED_CLIENT_VERSION = '3.5.1'
|
||||
REQUIRED_CLIENT_VERSION = '3.6.0'
|
||||
CLIENT_VERSION = REQUIRED_CLIENT_VERSION
|
||||
|
||||
|
||||
@ -116,9 +116,7 @@ class Client(Handler):
|
||||
{
|
||||
'availableVersion': CLIENT_VERSION,
|
||||
'requiredVersion': REQUIRED_CLIENT_VERSION,
|
||||
'downloadUrl': self._request.build_absolute_uri(
|
||||
reverse('page.client-download')
|
||||
),
|
||||
'downloadUrl': 'A new version of UDS Client is required.\nPlease, download it from Client Download section.',
|
||||
}
|
||||
)
|
||||
|
||||
@ -134,6 +132,11 @@ class Client(Handler):
|
||||
self._args
|
||||
) # If more than 2 args, got an error. pylint: disable=unbalanced-tuple-unpacking
|
||||
hostname = self._params['hostname'] # Or if hostname is not included...
|
||||
|
||||
version = self._params.get('version', '0.0.0')
|
||||
if version < '3.6.0':
|
||||
return Client.result(error='Client version not supported.\n Please, upgrade it.')
|
||||
|
||||
srcIp = self._request.ip
|
||||
|
||||
# Ip is optional,
|
||||
|
@ -136,7 +136,7 @@ def authCallback_stage2(
|
||||
return response
|
||||
except auths.exceptions.Redirect as e:
|
||||
return HttpResponseRedirect(
|
||||
request.build_absolute_uri(str(e)) if e.args and e.args[0] else '/'
|
||||
request.build_absolute_uri(str(e)) if e.args and e.args[0] != '/' else '/'
|
||||
)
|
||||
except auths.exceptions.Logout as e:
|
||||
return webLogout(
|
||||
|
Loading…
Reference in New Issue
Block a user