The branch, master has been updated via e089adced12ab9596a8c0b6f58ed8ce6f2bd2d3a (commit) from e10c24cf8733bec511fb7be8182bd0bb21394826 (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 ----------------------------------------------------------------- commit e089adced12ab9596a8c0b6f58ed8ce6f2bd2d3a Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jun 25 22:49:47 2013 +0200 Catch SSH Exception for mismatching host keys and make it translatable. (Fixes: #166). ----------------------------------------------------------------------- Summary of changes: debian/changelog | 2 ++ pyhoca/wxgui/frontend.py | 7 ++++++- pyhoca/wxgui/logon.py | 11 ++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 50ca626..4f1b0b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ pyhoca-gui (0.4.0.3-0~x2go1) UNRELEASED; urgency=low - On selecting »Unshare All Local Folders« purge all shares from the »export« session profile parameter if »restoreexports« is set to true in the session profile. + - Catch SSH Exception for mismatching host keys and make it translatable. + (Fixes: #166). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Sun, 21 Apr 2013 23:09:12 +0200 diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py index f845672..dbcdcfb 100644 --- a/pyhoca/wxgui/frontend.py +++ b/pyhoca/wxgui/frontend.py @@ -639,7 +639,12 @@ class PyHocaGUI(wx.App, x2go.X2GoClient): _logon_window = logon.PyHocaGUI_DialogBoxPassword(self, profile_name, caller=self, sshproxy_auth=True, ) self._logon_windows[profile_name] = _logon_window except x2go.SSHException, e: - self.notifier.send(_(u'%s - SSH error') % profile_name, u'%s!' % str(e), icon='auth_error', timeout=4000) + if str(e).startswith('Host key for server ') and str(e).endswith(' does not match!'): + host = str(e).replace('Host key for server ','').replace(' does not match!', '') + errmsg = _('Host key for X2Go server %s does not match') % host + else: + errmsg = str(e) + self.notifier.send(_(u'%s - SSH error') % profile_name, u'%s!' % errmsg, icon='auth_error', timeout=4000) try: self._temp_disabled_profile_names.remove(profile_name) except ValueError: diff --git a/pyhoca/wxgui/logon.py b/pyhoca/wxgui/logon.py index 9a99ac0..21d8617 100644 --- a/pyhoca/wxgui/logon.py +++ b/pyhoca/wxgui/logon.py @@ -411,11 +411,20 @@ class PyHocaGUI_DialogBoxPassword(wx.Dialog): connect_failed = True except x2go.SSHException, e: + + if str(e).startswith('Host key for server ') and str(e).endswith(' does not match!'): + host = str(e).replace('Host key for server ','').replace(' does not match!', '') + errmsg = _('Host key for X2Go server %s does not match') % host + else: + errmsg = str(e) + self._PyHocaGUI.notifier.prepare('AUTH_%s' % self.current_profile_name, title=_(u'%s - SSH error') % self.current_profile_name, - text='%s!' % str(e), + text='%s' % errmsg, icon='auth_error', timeout=4000) + + connect_failed = True except: hooks/post-receive -- pyhoca-gui.git (Python X2Go Client (wxPython GUI)) 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 "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).