[X2Go-Commits] python-x2go.git - release/0.4.0.x (branch) updated: 0.4.0.8-42-g4808f51

X2Go dev team git-admin at x2go.org
Tue Jan 7 16:18:43 CET 2014


The branch, release/0.4.0.x has been updated
       via  4808f519c54212ae6f1f8885271beb88d83b3805 (commit)
      from  8dd9b3192bb4454d0ed80fdab3530bdbf00c83cf (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:
 debian/changelog   |    1 +
 x2go/checkhosts.py |   10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index d587068..eb0426d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,7 @@ python-x2go (0.4.0.9-0x2go1) UNRELEASED; urgency=low
     - Make channel compression to all authentication methods.
     - Set keepalive on proxy channel.
     - Only use [<host>]:<port> if <port> is not 22.
+    - Handle host key checks for hosts that do not have a port specified.
   * debian/source/format:
     + Switch to format 1.0.
   * python-x2go.spec:
diff --git a/x2go/checkhosts.py b/x2go/checkhosts.py
index abebdd9..ff5fba6 100644
--- a/x2go/checkhosts.py
+++ b/x2go/checkhosts.py
@@ -79,7 +79,10 @@ class X2GoMissingHostKeyPolicy(paramiko.MissingHostKeyPolicy):
         @rtype: C{str}
 
         """
-        return self.get_hostname().split(':')[0].lstrip('[').rstrip(']')
+        if ":" in self.get_hostname():
+            return self.get_hostname().split(':')[0].lstrip('[').rstrip(']')
+        else:
+            return self.get_hostname().lstrip('[').rstrip(']')
 
     def get_hostname_port(self):
         """\
@@ -89,7 +92,10 @@ class X2GoMissingHostKeyPolicy(paramiko.MissingHostKeyPolicy):
         @rtype: C{str}
 
         """
-        return self.get_hostname().split(':')[1]
+        if ":" in self.get_hostname():
+            return int(self.get_hostname().split(':')[1])
+        else:
+            return 22
 
     def get_key(self):
         """\


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).




More information about the x2go-commits mailing list