X2Go dev team | 17 Nov 02:33 2012

python-x2go.git - master (branch) updated: 0.2.0.10-79-gdd46f32

The branch, master has been updated
       via  dd46f32662d19394bd2a495a1817068a04e11253 (commit)
      from  5035773988304b7af3f3b28b2e736eb832fc7501 (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 dd46f32662d19394bd2a495a1817068a04e11253
Author: Mike Gabriel <mike.gabriel@...>
Date:   Sat Nov 17 02:31:31 2012 +0100

    code cleanup using pyflakes

-----------------------------------------------------------------------

Summary of changes:
 x2go/backends/control/_stdout.py |    1 -
 x2go/client.py                   |   13 ++++++-------
 x2go/guardian.py                 |    7 +++++--
 x2go/registry.py                 |    2 +-
 x2go/session.py                  |   12 ++++++------
 5 files changed, 18 insertions(+), 17 deletions(-)

The diff of changes is:
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 53489b3..85a347e 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
 <at>  <at>  -38,7 +38,6  <at>  <at>  import locale
 import threading
 import cStringIO

-from distutils import version
 from gevent import socket

 # Python X2Go modules
diff --git a/x2go/client.py b/x2go/client.py
index e60aea8..1dd219b 100644
--- a/x2go/client.py
+++ b/x2go/client.py
 <at>  <at>  -194,13 +194,13  <at>  <at>  class X2goClient(object):
                  start_xserver=False,
                  start_pulseaudio=False,
                  use_cache=False,
-                 use_listsessions_cache=False, 
+                 use_listsessions_cache=False,
                  auto_update_listsessions_cache=False,
                  auto_update_listdesktops_cache=False,
                  auto_update_listmounts_cache=False,
                  auto_update_sessionregistry=False,
                  auto_register_sessions=False,
-                 no_auto_register_pubapp_sessions=False,
+                 no_auto_reg_pubapp_sessions=False,
                  refresh_interval=5,
                  pulseaudio_installdir=os.path.join(os.getcwd(), 'pulseaudio'),
                  logger=None, loglevel=log.loglevel_DEFAULT):
 <at>  <at>  -245,8 +245,8  <at>  <at>  class X2goClient(object):
          <at> type auto_update_sessionregistry: C{bool}
          <at> param auto_register_sessions: activate automatic X2Go session registration
          <at> type auto_register_sessions: C{bool}
-         <at> param no_auto_register_pubapp_sessions: skip automatic X2Go session registration for
suspended/running published applications sessions
-         <at> type no_auto_register_pubapp_sessions: C{bool}
+         <at> param no_auto_reg_pubapp_sessions: skip automatic X2Go session registration for
suspended/running published applications sessions
+         <at> type no_auto_reg_pubapp_sessions: C{bool}
          <at> param refresh_interval: refresh session list cache and session status every C{refresh_interval} seconds
          <at> type refresh_interval: C{int}
          <at> param pulseaudio_installdir: install path of Pulseaudio binary
 <at>  <at>  -349,14 +349,14  <at>  <at>  class X2goClient(object):
             self.pulseaudio = X2goPulseAudio(path=self.pulseaudio_installdir, client_instance=self, logger=self.logger)

         self.auto_register_sessions = auto_register_sessions
-        self.no_auto_register_pubapp_sessions = no_auto_register_pubapp_sessions
+        self.no_auto_reg_pubapp_sessions = no_auto_reg_pubapp_sessions
         self.session_registry = X2goSessionRegistry(self, logger=self.logger)
         self.session_guardian = X2goSessionGuardian(self,
auto_update_listsessions_cache=auto_update_listsessions_cache & (use_listsessions_cache|use_cache),
                                                     auto_update_listdesktops_cache=auto_update_listdesktops_cache & use_listsessions_cache,
                                                     auto_update_listmounts_cache=auto_update_listmounts_cache & use_listsessions_cache,
                                                     auto_update_sessionregistry=auto_update_sessionregistry,
                                                     auto_register_sessions=auto_register_sessions, 
-                                                    no_auto_register_pubapp_sessions=no_auto_register_pubapp_sessions,
+                                                    no_auto_reg_pubapp_sessions=no_auto_reg_pubapp_sessions,
                                                     refresh_interval=refresh_interval,
                                                     logger=self.logger
                                                    )
 <at>  <at>  -2435,7 +2435,6  <at>  <at>  class X2goClient(object):
         """
         _destroy_terminals = not ( self.auto_update_sessionregistry == True)
         session = self.session_registry(session_uuid)
-        profile_name = session.get_profile_name()
         session.clean_sessions(destroy_terminals=_destroy_terminals, published_applications=published_applications)
     __clean_sessions = clean_sessions

diff --git a/x2go/guardian.py b/x2go/guardian.py
index a164e7a..5e035ff 100644
--- a/x2go/guardian.py
+++ b/x2go/guardian.py
 <at>  <at>  -50,6 +50,7  <at>  <at>  class X2goSessionGuardian(threading.Thread):
                  auto_update_listmounts_cache=False, 
                  auto_update_sessionregistry=False,
                  auto_register_sessions=False,
+                 no_auto_reg_pubapp_sessions=False,
                  refresh_interval=5,
                  logger=None, loglevel=log.loglevel_DEFAULT):
         """\
 <at>  <at>  -64,6 +65,8  <at>  <at>  class X2goSessionGuardian(threading.Thread):
          <at> param auto_register_sessions: register new sessions automatically once they appear in the X2Go
session (e.g. 
             instantiated by another client that is connected to the same X2Go server under same user ID)
          <at> type auto_register_sessions: C{bool}
+         <at> param no_auto_reg_pubapp_sessions: do not auto-register published applications sessions
+         <at> type no_auto_reg_pubapp_sessions: C{bool}
          <at> param refresh_interval: refresh cache and session registry every <refresh_interval> seconds
          <at> type refresh_interval: C{int}
          <at> param logger: you can pass an L{X2goLogger} object to the L{X2goSessionGuardian} constructor
 <at>  <at>  -85,7 +88,7  <at>  <at>  class X2goSessionGuardian(threading.Thread):
         self.auto_update_listmounts_cache = auto_update_listmounts_cache
         self.auto_update_sessionregistry = auto_update_sessionregistry
         self.auto_register_sessions = auto_register_sessions
-        self.no_auto_register_pubapp_sessions = no_auto_register_pubapp_sessions
+        self.no_auto_reg_pubapp_sessions = no_auto_reg_pubapp_sessions
         self.refresh_interval = refresh_interval

         threading.Thread.__init__(self, target=self.guardian)
 <at>  <at>  -118,7 +121,7  <at>  <at>  class X2goSessionGuardian(threading.Thread):

                 # session auto-registration will automatically trigger an update of the session registry status
                 if self.auto_register_sessions:
-                    self.client_instance.register_available_server_sessions_all_profiles(skip_pubapp_sessions=self.no_auto_register_pubapp_sessions)
+                    self.client_instance.register_available_server_sessions_all_profiles(skip_pubapp_sessions=self.no_auto_reg_pubapp_sessions)

         self.logger('X2Go session guardian thread waking up after %s seconds' % seconds, loglevel=log.loglevel_DEBUG)

diff --git a/x2go/registry.py b/x2go/registry.py
index de55998..6619f19 100644
--- a/x2go/registry.py
+++ b/x2go/registry.py
 <at>  <at>  -28,9 +28,9  <at>  <at>  import copy
 import types
 import time
 import threading
+import re

 # Python X2Go modules
-import defaults
 import log
 import utils
 import session
diff --git a/x2go/session.py b/x2go/session.py
index 33c1701..92c911e 100644
--- a/x2go/session.py
+++ b/x2go/session.py
 <at>  <at>  -1199,6 +1199,10  <at>  <at>  class X2goSession(object):
             if sshproxy_reuse_authinfo is not None:
                 self.sshproxy_reuse_authinfo = sshproxy_reuse_authinfo

+            _params = {}
+            _params.update(self.control_params)
+            _params.update(self.sshproxy_params)
+
             if username:
                 self.control_params['username'] = username
             if add_to_known_hosts is not None:
 <at>  <at>  -1222,15 +1226,11  <at>  <at>  class X2goSession(object):
                     self.sshproxy_params['sshproxy_key_filename'] = self.control_params['key_filename']
                 if _params.has_key('pkey'):
                     self.sshproxy_params['sshproxy_pkey'] = self.control_params['pkey']
-                if params.has_key('password'):
+                if _params.has_key('password'):
                     self.sshproxy_params['sshproxy_password'] = self.control_params['password']
-                if params.has_key('password'):
+                if _params.has_key('password'):
                     self.sshproxy_params['sshproxy_password'] = self.control_params['password']

-            _params = {}
-            _params.update(self.control_params)
-            _params.update(self.sshproxy_params)
-
             if 'port' not in _params:
                 _params['port'] = self.port

hooks/post-receive

Gmane