[X2Go-Commits] [python-x2go] 02/03: x2go/backends/control/plain.py: Handle password based authentication failures graceful. Uncomment previously commented out code.
git-admin at x2go.org
git-admin at x2go.org
Mon Sep 25 14:09:04 CEST 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch release/0.5.0.x
in repository python-x2go.
commit 351ab49aabddb32258e431561a586b224b17815f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sun Sep 24 19:56:10 2017 +0200
x2go/backends/control/plain.py: Handle password based authentication failures graceful. Uncomment previously commented out code.
---
x2go/backends/control/plain.py | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/x2go/backends/control/plain.py b/x2go/backends/control/plain.py
index 242b7e6..a55a425 100644
--- a/x2go/backends/control/plain.py
+++ b/x2go/backends/control/plain.py
@@ -1096,19 +1096,14 @@ class X2GoControlSession(paramiko.SSHClient):
if not password:
password = "".join([random.choice(string.letters+string.digits) for x in range(1, 20)])
self.logger('performing SSH password authentication with server', loglevel=log.loglevel_DEBUG)
- #try:
- paramiko.SSHClient.connect(self, _hostname, port=port, username=username, password=password,
+ try:
+ paramiko.SSHClient.connect(self, _hostname, port=port, username=username, password=password,
timeout=timeout, allow_agent=False, look_for_keys=False)
- #except paramiko.AuthenticationException, e:
- # self.close()
- # if self.sshproxy_session:
- # self.sshproxy_session.stop_thread()
- # raise e
- #except:
- # self.close()
- # if self.sshproxy_session:
- # self.sshproxy_session.stop_thread()
- # raise
+ except:
+ self.close()
+ if self.sshproxy_session:
+ self.sshproxy_session.stop_thread()
+ raise
self.set_missing_host_key_policy(paramiko.RejectPolicy())
--
Alioth's /srv/git/code.x2go.org/python-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git
More information about the x2go-commits
mailing list