The branch, twofactorauth has been updated via db9631eda589d695f31735ee31adb421cf0f0211 (commit) from 846da07298c6b26d3280e30f991dc49b6dce33aa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: x2go/session.py | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) The diff of changes is: diff --git a/x2go/session.py b/x2go/session.py index 20a8e12..fd51534 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -395,6 +395,25 @@ class X2goSession(paramiko.SSHClient): def __del__(self): self._x2go_tidy_up() + def _x2go_tidy_up(self): + + if self.proxy is not None: + self.proxy.__del__() + + try: + if self.get_transport() is not None: + for _tunnel in [ _tun[1] for _tun in self.get_transport().reverse_tunnels.values() ]: + if _tunnel is not None: + _tunnel.__del__() + + self.get_transport().stop_thread() + + if self.print_queue is not None: + self.print_queue.__del__() + + except AttributeError: + pass + def _mk_session_rootdir(self, d): try: @@ -413,10 +432,15 @@ class X2goSession(paramiko.SSHClient): else: cmd = cmd_line if self.get_transport() is not None: - self.logger('executing command on X2go server: %s' % cmd, loglevel) - return self.exec_command(cmd, **kwargs) + + try: + self.logger('executing command on X2go server: %s' % cmd, loglevel) + return self.exec_command(cmd, **kwargs) + except AttributeError: + raise x2go_exceptions.X2goSessionException('the Paramiko/SSH session of X2go session %s has died' % self.session_info) + else: - raise exceptions.X2goSessionException('the Paramiko/SSH client is not connected') + raise x2go_exceptions.X2goSessionException('the Paramiko/SSH client is not connected') def _x2go_sftp_put(self, local_path, remote_path, loglevel=log.loglevel_INFO): @@ -452,25 +476,6 @@ class X2goSession(paramiko.SSHClient): self._session_auth_rsakey = paramiko.RSAKey.generate(defaults.RSAKEY_STRENGTH) return self._session_auth_rsakey - def _x2go_tidy_up(self): - - if self.proxy is not None: - self.proxy.__del__() - - try: - if self.get_transport() is not None: - for _tunnel in [ _tun[1] for _tun in self.get_transport().reverse_tunnels.values() ]: - if _tunnel is not None: - _tunnel.__del__() - - if self.print_queue is not None: - self.print_queue.__del__() - - except AttributeError: - pass - self.get_transport().stop_thread() - - def connect(self, hostname, port=22, username=None, password=None, pkey=None, key_filename=None, timeout=None, allow_agent=False, look_for_keys=True, add_to_known_hosts=False, force_password_auth=False): hooks/post-receive -- python-x2go.git (Python X2Go Client API) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "python-x2go.git" (Python X2Go Client API).