[X2Go-Commits] python-x2go.git - release/0.4.0.x (branch) updated: 557ea72896b56e41c23afb9098034f417d9fbb5f

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


The branch, release/0.4.0.x has been updated
       via  557ea72896b56e41c23afb9098034f417d9fbb5f (commit)
      from  3d0f0b665c8bbf1b3e928acde80e6ab381da28c8 (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:
 x2go/__init__.py |    2 ++
 x2go/defaults.py |    5 ++++-
 x2go/printing.py |    7 +++++--
 x2go/proxy.py    |    7 ++++++-
 x2go/xserver.py  |    7 ++++++-
 5 files changed, 23 insertions(+), 5 deletions(-)

The diff of changes is:
diff --git a/x2go/__init__.py b/x2go/__init__.py
index 3f30976..88bfa03 100644
--- a/x2go/__init__.py
+++ b/x2go/__init__.py
@@ -173,3 +173,5 @@ from x2go_exceptions import *
 from log import *
 
 from cleanup import x2go_cleanup
+
+from defaults import X2GOCLIENT_OS
diff --git a/x2go/defaults.py b/x2go/defaults.py
index 3ade2c2..8e7e22f 100644
--- a/x2go/defaults.py
+++ b/x2go/defaults.py
@@ -26,14 +26,17 @@ __NAME__ = 'x2godefaults-pylib'
 import sys
 import os
 import paramiko
+import platform
 
 ##
 ## Common X2go defaults
 ##
 
+X2GOCLIENT_OS = platform.system()
+
 LOCAL_HOME = os.path.expanduser('~')
 # setting OS dependent variables
-if sys.platform == "win32":
+if X2GOCLIENT_OS == "Windows":
     CURRENT_LOCAL_USER = os.environ['USERNAME']
 else:
     CURRENT_LOCAL_USER = os.environ['LOGNAME']
diff --git a/x2go/printing.py b/x2go/printing.py
index 82ef06a..734eb8b 100644
--- a/x2go/printing.py
+++ b/x2go/printing.py
@@ -49,9 +49,12 @@ import inifiles
 import cStringIO
 import ConfigParser
 
-if sys.platform == 'win32':
+from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS
+if _X2GOCLIENT_OS in ("Windows"):
+    import subprocess
     import win32api
-
+else:
+    import gevent_subprocess as subprocess
 
 # Python X2go modules
 import log
diff --git a/x2go/proxy.py b/x2go/proxy.py
index 01280b8..a2c4cc2 100644
--- a/x2go/proxy.py
+++ b/x2go/proxy.py
@@ -25,7 +25,6 @@ __NAME__ = 'x2goproxy-pylib'
 
 # modules
 import gevent
-import gevent_subprocess as subprocess
 import os
 import sys
 import types
@@ -37,6 +36,12 @@ import threading
 import forward
 import log 
 
+from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS
+if _X2GOCLIENT_OS in ("Windows"):
+    import subprocess
+else:
+    import gevent_subprocess as subprocess
+
 
 class X2goProxy(threading.Thread):
     """\
diff --git a/x2go/xserver.py b/x2go/xserver.py
index e72a0bf..77058fe 100644
--- a/x2go/xserver.py
+++ b/x2go/xserver.py
@@ -26,7 +26,6 @@
 #       none so far
 
 import os
-import gevent_subprocess as subprocess
 
 __NAME__ = 'x2gosettings-pylib'
 
@@ -40,6 +39,12 @@ from defaults import X2GO_XCONFIG_CONFIGFILES
 from defaults import X2GO_CLIENTXCONFIG_DEFAULTS
 import inifiles
 
+from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS
+if _X2GOCLIENT_OS in ("Windows"):
+    import subprocess
+else:
+    import gevent_subprocess as subprocess
+
 
 class X2goClientXConfig(inifiles.X2goIniFile):
     """\


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