bug fixing

This commit is contained in:
speyrefitte
2015-05-04 11:47:25 +02:00
parent 0a5a1fd12c
commit 1deb2d69ea
2 changed files with 7 additions and 3 deletions

View File

@@ -115,7 +115,11 @@ class RDPClientQtFactory(rdp.ClientFactory):
self._nego = security == "nego"
self._recodedPath = recodedPath
if self._nego:
self._security = rdp.SecurityLevel.RDP_LEVEL_NLA
#compute start nego nla need credentials
if username != "" and password != "":
self._security = rdp.SecurityLevel.RDP_LEVEL_NLA
else:
self._security = rdp.SecurityLevel.RDP_LEVEL_SSL
else:
self._security = security
self._w = None
@@ -190,7 +194,7 @@ def autoDetectKeyboardLayout():
if os.name == 'posix':
from subprocess import check_output
result = check_output(["setxkbmap", "-print"])
if "azerty" in result:
if 'azerty' in result:
return "fr"
elif os.name == 'nt':
import win32api, win32con, win32process

View File

@@ -56,5 +56,5 @@ def scancodeToChar(code):
@return: char
"""
if not _SCANCODE_QWERTY_.has_key(code):
return "<unknown scancode>"
return "<unknown scancode %x>"%code
return _SCANCODE_QWERTY_[code];