This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.

commit 6c88a4ca7be0ccf9983a0e31baab8bff014865f5
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date:   Thu Dec 2 14:19:13 2010 +0000

    * added known_host kwarg to X2goClient__register_session
    * added code that recognizes if we are running from development dir or from 
/usr/bin
    * some minor changes
    
    
    git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@112 
cdb5e8f1-f799-4276-8919-bce57fd91830
---
 pyhoca-cli             | 17 ++++++++++++-----
 pyhoca/cli/frontend.py | 13 +++++++------
 pyhoca/cli/x2go        |  1 -
 3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/pyhoca-cli b/pyhoca-cli
index 50129691..9a8dab28 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -26,17 +26,21 @@
 ### module section
 ###
 
-import sys, os
+import x2go
+
+import sys
+import os
+app = sys.argv[0]
+if app.startswith('./'):
+    sys.path.insert(0, os.path.join(os.path.dirname(__file__)))
+    os.environ['PYTHONX2GO_LOCAL'] = '1'
+
 import time
 import argparse
 import getpass
-import x2go
 import paramiko
 from types import *
 
-# for debugging
-import pprint
-
 # Python X2go provides the current local username (OS independent)
 from x2go.defaults import CURRENT_LOCAL_USER as current_user
 
@@ -181,6 +185,9 @@ Possible values for the --pack NX option are:
     if a.username is None:
         a.username = current_user
 
+    # statically no password from the command line
+    a.password = None
+
     # time-to-wait needs to be an integer
     try:
         a.time_to_wait = int(a.time_to_wait)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index a4c5aefd..80a5d47b 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -22,13 +22,12 @@
 #    2010 Dick Kniep <dick.kn...@lindix.nl>
 #    2010 Jörg Sawatzki <joerg.sawat...@web.de>
 
+import x2go
 import sys
 import os
 import copy
 import time
 import getpass
-import x2go
-import paramiko
 from types import *
 from gevent import socket
 
@@ -142,7 +141,7 @@ class PyHocaCLI(x2go.X2goClient):
         if self.args.session_profile is None:
             self.logger('command for new session is: %s' % self.args.command, 
loglevel=x2go.loglevel_DEBUG, )
         else:
-            self.logger('command from session profile to run is: %s' % 
self.session_registry(self.x2go_session_hash).session_params['cmd'], 
loglevel=x2go.loglevel_DEBUG, )
+            self.logger('command from session profile to run is: %s' % 
self.session_registry(self.x2go_session_hash).get_session_cmd(), 
loglevel=x2go.loglevel_DEBUG, )
         self._X2goClient__start_session(s_hash)
 
 
@@ -212,12 +211,16 @@ class PyHocaCLI(x2go.X2goClient):
                         kwargs[a] = v
 
             # setup up the session profile based X2go session
-            self.x2go_session_hash = 
self._X2goClient__register_session(profile_name=self.args.session_profile, 
**kwargs)
+            self.x2go_session_hash = 
self._X2goClient__register_session(profile_name=self.args.session_profile,
+                                                                        
known_hosts=ssh_known_hosts_filename,
+                                                                        
**kwargs
+                                                                       )
 
         else:
 
             # setup up the manually configured X2go session
             self.x2go_session_hash = 
self._X2goClient__register_session(args.server, 
port=int(self.args.remote_ssh_port), 
+                                                           
known_hosts=ssh_known_hosts_filename,
                                                            
username=self.args.username, 
                                                            
password=self.args.password,
                                                            
key_filename=self.args.ssh_privkey,
@@ -237,8 +240,6 @@ class PyHocaCLI(x2go.X2goClient):
                                                            
share_local_folders=self.args.share_local_folders,
                                                            
cmd=self.args.command)
 
-        
self.with_session(self.x2go_session_hash).load_host_keys(ssh_known_hosts_filename)
-
 
     def authenticate(self):
         """\
diff --git a/pyhoca/cli/x2go b/pyhoca/cli/x2go
deleted file mode 120000
index b7003701..00000000
--- a/pyhoca/cli/x2go
+++ /dev/null
@@ -1 +0,0 @@
-../../../../python/python-x2go/trunk/x2go
\ No newline at end of file

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to