The branch, master has been updated via 13dadf1fd8d4bf32b64ef9a966af8e76868a14e1 (commit) from 893b629c7f5b97fffcfcce64f155d189bea9f685 (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 13dadf1fd8d4bf32b64ef9a966af8e76868a14e1 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Apr 3 14:06:40 2012 +0200 Provide X2goSession method get_session_profile_option(). ----------------------------------------------------------------------- Summary of changes: debian/changelog | 1 + x2go/session.py | 39 +++++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index e60390e..716bbb5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -75,6 +75,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low - Provide X2goClient method get_session_info(), do not auto start/resume sessions in published applications mode, provide hook method for auto-connecting interactively. + - Provide X2goSession method get_session_profile_option(). * Depend on python-xlib. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Sat, 28 Sep 2012 01:44:21 +0100 diff --git a/x2go/session.py b/x2go/session.py index 5450016..4aef0e2 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -59,8 +59,20 @@ from defaults import X2GO_SSH_ROOTDIR as _X2GO_SSH_ROOTDIR from defaults import SUPPORTED_SOUND, SUPPORTED_PRINTING, SUPPORTED_FOLDERSHARING, SUPPORTED_MIMEBOX -# options of the paramiko.SSHClient().connect() -_X2GO_SESSION_PARAMS = ('geometry', 'depth', 'link', 'pack', +_X2GO_SESSION_PARAMS = ('use_sshproxy', 'profile_id', 'session_name', + 'auto_start_or_resume', 'auto_connect', + 'printing', 'allow_mimebox', + 'mimebox_extensions', 'mimebox_action', + 'allow_share_local_folders', 'share_local_folders', + 'control_backend', 'terminal_backend', 'info_backend', 'list_backend', 'proxy_backend', 'settings_backend', 'printing_backend', + 'client_rootdir', 'sessions_rootdir', 'ssh_rootdir', + 'keep_controlsession_alive', 'add_to_known_hosts', 'known_hosts' + 'connected', 'virgin', 'running', 'suspended', 'terminated', 'faulty' + 'client_instance', + ) +"""A list of allowed X2Go pure session parameters (i.e. parameters that are passed on neither to an X2goControlSession, X2goSSHProxy nor an X2goControlSession object.""" +# options of the paramiko.SSHClient().connect() method, any option that is allowed for a terminal session instance +_X2GO_TERMINAL_PARAMS = ('geometry', 'depth', 'link', 'pack', 'cache_type', 'kblayout', 'kbtype', 'session_type', 'snd_system', 'snd_port', 'cmd', 'set_session_title', 'session_title', @@ -74,7 +86,7 @@ _X2GO_SESSION_PARAMS = ('geometry', 'depth', 'link', 'pack', 'control_backend', 'terminal_backend', 'proxy_backend', 'profiles_backend', 'settings_backend', 'printing_backend', ) -"""A list of allowed X2Go session parameters.""" +"""A list of allowed X2Go terminal session parameters.""" _X2GO_SSHPROXY_PARAMS = ('sshproxy_host', 'sshproxy_user', 'sshproxy_password', 'sshproxy_key_filename', 'sshproxy_pkey', 'sshproxy_tunnel', ) @@ -499,6 +511,21 @@ class X2goSession(object): self.profile_name = profile_name self.control_session.set_profile_name(profile_name) + def get_session_profile_option(self, option): + """\ + Retrieve a specific profile parameter for this session. + + @param option: name of a specific profile option to be queried. + @type option: C{str} + @return: value for profile option C{<option>} + @rtype: C{bool,str,int} + + """ + if option in _X2GO_SESSION_PARAMS + _X2GO_TERMINAL_PARAMS + _X2GO_SSHPROXY_PARAMS and hasattr(self, option): + return eval("self.%s" % option) + else: + raise x2go_exceptions.X2goProfileException('Unknown session profile option: %s.' % option) + def __str__(self): return self.__get_uuid() @@ -596,10 +623,6 @@ class X2goSession(object): del params['use_sshproxy'] except KeyError: pass try: - self.auto_connect = params['auto_connect'] - del params['auto_connect'] - except KeyError: pass - try: self.auto_start_or_resume = params['auto_start_or_resume'] del params['auto_start_or_resume'] except KeyError: pass @@ -608,7 +631,7 @@ class X2goSession(object): _control_params = copy.deepcopy(params) _sshproxy_params = copy.deepcopy(params) for p in params.keys(): - if p in session._X2GO_SESSION_PARAMS: + if p in session._X2GO_TERMINAL_PARAMS: del _control_params[p] del _sshproxy_params[p] elif p in session._X2GO_SSHPROXY_PARAMS: 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).