1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Small Fix, so UDS client gets an exception in case of UDS being unable

to identify client platform.
This commit is contained in:
Adolfo Gómez García 2017-08-02 16:08:46 +02:00
parent 2b9cd5508d
commit 29e062ba5d
2 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ from uds.core.transports import protocols
import logging
__updated__ = '2016-10-14'
__updated__ = '2017-08-02'
logger = logging.getLogger(__name__)
@ -178,8 +178,7 @@ class Transport(Module):
'''
return '''
from __future__ import unicode_literals
from PyQt4 import QtCore, QtGui
QtGui.QMessageBox.critical(parent, 'Not supported', 'The transport {transport.name} is not supported on your platform.', QtGui.QMessageBox.Ok)
raise Exception('The transport {transport.name} is not supported on your platform.')
'''.format(service=userService, transport=transport)
def getLink(self, userService, transport, ip, os, user, password, request):

View File

@ -44,7 +44,7 @@ logger = logging.getLogger(__name__)
READY_CACHE_TIMEOUT = 30
__updated__ = '2017-06-05'
__updated__ = '2017-08-02'
class RDPTransport(BaseRDPTransport):
@ -148,6 +148,7 @@ class RDPTransport(BaseRDPTransport):
}.get(m.os)
if os is None:
return super(RDPTransport, self).getUDSTransportScript(self, userService, transport, ip, os, user, password, request)
logger.ERROR('Os not detected for RDP Transport: {}'.format(request.META.get('HTTP_USER_AGENT', 'Unknown')))
return super(RDPTransport, self).getUDSTransportScript(userService, transport, ip, os, user, password, request)
return self.getScript('scripts/{}/direct.py'.format(os)).format(m=m)