From 1deb2d69ea7d0b351df3a122e0298b237ca2c547 Mon Sep 17 00:00:00 2001 From: speyrefitte Date: Mon, 4 May 2015 11:47:25 +0200 Subject: [PATCH] bug fixing --- bin/rdpy-rdpclient.py | 8 ++++++-- rdpy/core/scancode.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/rdpy-rdpclient.py b/bin/rdpy-rdpclient.py index b78fc1b..937b968 100755 --- a/bin/rdpy-rdpclient.py +++ b/bin/rdpy-rdpclient.py @@ -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 diff --git a/rdpy/core/scancode.py b/rdpy/core/scancode.py index 9920368..37e27d6 100644 --- a/rdpy/core/scancode.py +++ b/rdpy/core/scancode.py @@ -56,5 +56,5 @@ def scancodeToChar(code): @return: char """ if not _SCANCODE_QWERTY_.has_key(code): - return "" + return ""%code return _SCANCODE_QWERTY_[code]; \ No newline at end of file